home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 2 / ACE CD 2.iso / FILES / DOCS / AMOSDOC.LHA / Amos1.3.doc next >
Encoding:
Text File  |  1994-11-27  |  151.4 KB  |  4,950 lines

  1. Created by HyperEdit
  2.  
  3. The Amos AmigaGuide help file main subjects:
  4. --------------------------------------------
  5.  
  6. THE AMOS EMAIL LIST
  7. THE AMOS PROCEDURE LIBRARY
  8. THE AMOS TEAM
  9. SFX SITE
  10.  
  11. AMOS 1.3 COMMANDS
  12. THE AMOS 1.3 EDITOR
  13.  
  14. AMOS PRO COMPILER
  15.  
  16. HINTS AND TIPS
  17. BUGS
  18.  
  19.     Address: amos-list@ccess.digex.net 
  20.  
  21.     Purpose: For the AMOS programming language on Amiga computers.
  22.     Features source, bug reports, and help from users around the
  23.     world, but mainly European users.  Most posts will be in English
  24.     but there are no limitations to the language used, since AMOS
  25.     is very popular in most European countries.
  26.  
  27.  
  28.  
  29. Programing subject:
  30.   GRAPICS
  31.   SYSTEM
  32.   AMAL
  33.  
  34. NON PROGRAMING TIPS
  35.  
  36. PROCESSOR TYPE
  37. PAL-NTSC
  38. VARPTR
  39.  
  40. Date: 17 Jun 93 18:15:00 EST
  41. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  42. Subject: Re: Processor type
  43. To: "amos-list" <amos-list@ccess.digex.net>
  44.  
  45.   To find out the type of processor being used, look at the word at offset
  46. 296 in ExecBase [=Deek(Leek(4)+296)].  The bits are as follows:
  47.  
  48. Processor:
  49.   Bit 0 = 68010 or better
  50.       1 = 68020 or better
  51.       2 = 68030 or better
  52.       3 = 68040 or better
  53.  
  54. Co-processor:
  55.   Bit 4 = 68881 or better
  56.   Bit 5 = 68882 or better
  57.  
  58.   So, to determine the actual processor, find the highest set bit in each
  59. field.  That bit indicates the processor.
  60.  
  61.   --Andy Church
  62.  
  63.  
  64. Date: Mon, 12 Jul 93 15:46 GMT0BST-1
  65. From: Phil South <snouty@ix.compulink.co.uk>
  66. Subject: Amos Pro Compiler
  67. To: amos-list@ccess.digex.net
  68.  
  69.  
  70.  
  71. This full review will be appearing in Amiga Computing. Or at least a
  72. version of it. Enjoy, my fellow AMOS fiends, or should that be
  73. friends? No I like fiends.
  74.  
  75. Phil
  76.  
  77. -------------
  78.  
  79. Review
  80.  
  81. AMOS Professional Compiler
  82.  
  83. Phil South reviews the latest addition to the AMOS family, but when
  84. all the dust settles is it any cop?
  85.  
  86. This is the AMOS product that's perhaps been more hotly debated and
  87. more eagerly awaited than just about any other. The thing is that
  88. AMOS as a development system was pretty much perfect, and the only
  89. thing missing from Pro, apart from a really good bug fixed version,
  90. was the compiler.
  91.         Now don't get me wrong, I know I'm always banging on about
  92. how Pro is buggy but that's not because it's completely no good. No
  93. no no. It's just that it's at the stage that AMOS was a few years ago 
  94. when it first came out. It just needs a lot of use before all the
  95. bugs in the new features can be ironed out.
  96.         You see AMOS Pro is actually still the basic AMOS program you 
  97. know and love, but there's been a lot of augmentation, and it'll take 
  98. a while for the code to settle down after all the additions have been 
  99. used a lot and all the bugs ironed out. But it will happen, and truth 
  100. be told I'm going to start using Pro a lot more now. I know I said it 
  101. would take a while to make me switch from AMOS Classic, and I know
  102. I'll still have that to fall back on should Pro let me down. But it's 
  103. time to start having a little faith in the new program, and helping
  104. to iron out bugs rather than just sitting here griping about them
  105.  
  106. New Compiler Old Compiler
  107. The same things I just said about the Pro compiler are true about Pro 
  108. Compiler. It's still basically the same engine under the hood, just a 
  109. new 1993 body and few technical enhancements which affect the way the 
  110. thing drives, a bit like a Mondeo.
  111.         The face is different, that is to say that the front end
  112. program is much altered, and it runs from an icon rather than being
  113. loaded into AMOS, but I guess this just means that the program has
  114. been compiled. The compiler works with previous versions of the AMOS
  115. program like AMOS and Easy AMOS, so you can buy the new compiler even 
  116. if you don't yet have the newest version of the language.
  117.  
  118. New Commands
  119. The compiler obviously copes with all the new versions of AMOS Pro
  120. and all the new commands which have been added to the language since
  121. the last compiler was built. This obviously takes in all the ANIM
  122. player commands and music player commands too, and the library for
  123. compiled programs to share means small programs if the target
  124. computer for your programs is running the correct amos.library. Even
  125. though you should use the shared library setting if you want to be
  126. sure people can run your programs, this is a big saving on size and
  127. so should be considered if you know everyone who'll be using your
  128. code.
  129.         You can do the usual squash command to compress the files,
  130. but you know every time I use this something goes wrong, not just in
  131. Compiler Pro but in the old Compiler too. I tend to forget that and
  132. use PowerPacker for online compression and decompression. The remove
  133. default screen problem is still there too. If you program uses and
  134. unpack command then the screen is automatically created into your
  135. default screen right? But if there is no default screen the screen
  136. can't be created, so no go.
  137.         You can also load in ASCII files for compilation, which is
  138. handy if you want to develop your programs on a laptop or palmtop
  139. word processor and transfer them for compilation. (I could use my
  140. trusty Portfolio, even!) There is talk too of this compiler being
  141. even faster than the original compiler. That is very hard to test,
  142. and really I couldn't see any difference. (If anyone at Europress can 
  143. send me a reliable benchmark program, I'll be happy to run it, if not 
  144. print it in the next issue!) But the program sizes were very
  145. different with a shared library. 61K including library plays 18k
  146. without. Not bad, but not totally portable to any machine which
  147. doesn't run the amos.library, so not really as good as a fully
  148. optimised compiler which would not include any commands not used in
  149. the program itself.
  150.  
  151. Free AMOS Pro 2.0
  152. The program comes free with an updater to make your you have the
  153. latest version of AMOS Pro on your machine. I must admit I found this 
  154. a little bit odd. I installed the AMOS Pro program about 10 seconds
  155. before I tried to use the updater, and I got an error message saying
  156. I needed to use the correct path. I was using the correct path,
  157. dammit, and I couldn't get it to change it's tune, so I killed it and 
  158. installed to floppies, then RE-INSTALLED the new version to hard
  159. disk. This got up my nose more than a little, but I still can't
  160. figure out what the problem was.
  161.  
  162. Conclusion
  163. Despite all these niggles and quibbles I do think the release of this 
  164. program should be applauded, for no other reason than it allows us
  165. serious AMOS users to put our backs into it and see if AMOS Pro
  166. really has what it takes to be the Amiga development system of the
  167. 90s.
  168.         Obviously seasoned users will see that this is not anything
  169. new, but rather an upgrade of what has gone before. It's a tool, it
  170. does the job, but as my old man would say "if I wanted something to
  171. write home about I'd have been to the circus." Funny chap, my old
  172. man.
  173.  
  174.  
  175. (ENDS)
  176.  
  177.  
  178. AMOS 3D
  179. BITPLANES
  180.  
  181. OM FILEFORMAT
  182.  
  183. The om fileformat can be found in the file SimStructs on the object modeller disk
  184.  
  185. AMOS PRO CONFIG FILE
  186.  
  187. Date: 7 Sep 93 14:32:00 EST
  188. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  189. Subject: Re: Configuration
  190. To: "amos-list" <amos-list@ccess.digex.net>
  191.  
  192. >What is the name, and location of the configuration file used by AMOS
  193. >Pro? I added an extension, it won't run now, etc. I'm sure there are
  194. >lots of people out there who have had this same problem.
  195.  
  196.   It's S:AMOSPro_Interpreter_Config.
  197.  
  198.   --Andy Church
  199.  
  200.  
  201. Date: 12 Sep 93 11:41:00 EST
  202. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  203. Subject: Re: PAL/NTSC
  204. To: "amos-list" <amos-list@ccess.digex.net>
  205.  
  206. >Is there an OS call to change between NTSC and PAL? Or would it be easier
  207. >to Poke something? It can't be too hard, Mode_Switch is only 4K... can
  208. >someone help?
  209.  
  210.   Just Doke $DFF1DC,x.  For NTSC, x=0; for PAL, x=$20.
  211.  
  212.   Note that this only works on ECS systems (and probably AGA, although I
  213. haven't been able to test it).
  214.  
  215.   --Andy Church
  216.  
  217.  
  218. MATH
  219. MENUS
  220.  
  221. Date: 15 Sep 93 12:08:00 EST
  222. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  223. Subject: Re: Amos bugs, and thankyous
  224. To: "amos-list" <amos-list@ccess.digex.net>
  225.  
  226. >  Another bug I found is with the arccos function (hold on...but you don't NEED
  227. >arccos for vectors.....well, tis fixed now but still).  When you feed in very
  228. >small values (order of about 1*10^-7) it returns ludicrous values.  tsk tsk!
  229.  
  230.   It seems that a lot of the transcendental functions give bad return values
  231. in certain cases.  Try Cos(90) and see what you get.  It's not 0, but
  232. something like 10^-7, which was enough to make my vertical lines diagonal.
  233.  
  234. [18-line signature deleted]
  235.  
  236.   Please, don't get carried away!  Signatures are fine, but not HUGE ones!
  237.  
  238.   --Andy Church
  239.  
  240.  
  241. (DE)ACCELERATION
  242.  
  243. From: Mikko Makela <mmmakela@c.helsinki.fi>
  244. Message-Id: <199309151748.AA05528@ruuna.helsinki.fi>
  245. Subject: AMAL-routine
  246. To: amos-list@ccess.digex.net
  247. Date: Wed, 15 Sep 1993 20:48:22 +0300 (EET DST)
  248.  
  249. Quite many of you showed interest with this, so I'm sending
  250. this to the list (it's < 2k).
  251. I decided to make litle demonstration program out of it, just
  252. to make it easier to understand.
  253.  
  254. --------------------cut here-------------------
  255.  
  256. 'This is a small demo program to show, how to use AMAL's Move-command
  257. 'for (de)acceleration of objects.
  258.  
  259. 'Programmed by Mikko Mdkeld
  260.  
  261. BALL=4 : Rem amount of balls
  262. _TOPSPEED=200 : LOWEST_POSSIBLE_STEPCOUNT=4
  263. 'R2 must not > RB (topspeed) 
  264. 'RC will tell the lowest possible number of steps in movement. 
  265. Amreg(1)=_TOPSPEED : Amreg(2)=LOWEST_POSSIBLE_STEPCOUNT
  266.  
  267.    'if ball hits the wall, main program will set R4=1, so 
  268.    'that the Move command will be initiliazed.
  269. A$="AUtotest (If R4=1 Jump Wall "
  270.    'if ball must be stopped, R3 will be set to 1, and 
  271.    'to continue the movement R3->2  
  272. A$=A$+"If R3=1 Jump Hold ;If R3=2 Jump Go on "
  273.    'R2 will be decreased every time the autotest is run, and
  274.    'if it's <1, ball will be stopped. 
  275.    'R2 is also used to count in how many steps will the movement be done. 
  276. A$=A$+"If R2<1 Direct Owait else Let R2=R2-1 eXit "
  277. A$=A$+"Wall:Let R4=0 Direct Begin "
  278. A$=A$+"Hold:Direct Sleep; Go on:Let R3=0 Direct Begin)"
  279.    'Here is the Move command
  280. A$=A$+"Begin:If R2<1 Jump Owait; Move R0,R1,RC*RB/R2; Jump Begin "
  281. A$=A$+"Sleep:Wait ;Owait: If R2>0 J Begin Pause J Owait "
  282.  
  283. 'let's make an boject to move
  284. Circle 100,100,7 : Paint 100,100 : Get Bob 0,1,90,90 To 111,111 : Cls 1
  285.  
  286. 'init each ball
  287. For L=0 To BALL-1
  288.    Channel L To Bob L
  289.    Bob L,80+L*15,80+L*15,1
  290.    Amal L,A$
  291.    Amreg(L,4)=1
  292. Next L
  293. 'try different values for speed,range & angle
  294. RSPEED=5000
  295. RANGE=50
  296. ANGLE#=3.3
  297. For L=0 To BALL-1
  298.    Amreg(L,0)=RANGE*Cos(ANGLE#-L*0.1) : Rem x-movemnt
  299.    Amreg(L,1)=RANGE*Sin(ANGLE#-L*0.1) : Rem y-movement 
  300.    Amreg(L,2)=RSPEED/RANGE+1 : Rem speed
  301.    Amreg(L,3)=0 : Rem just to make sure
  302.    Amreg(L,4)=1 : Rem to init movementsequence 
  303. Next L
  304.  
  305. Synchro Off : Amal On 
  306. Repeat 
  307.    For L=0 To BALL-1
  308.       'test for left screenborder
  309.       If X Bob(L)<1
  310.          Amreg(L,0)=-Amreg(L,0)
  311.          Amreg(L,4)=1
  312.          Bob L,0,,
  313.       End If 
  314.    Next L
  315.    'try without wait! 
  316.    Wait 2
  317.    Synchro 
  318. Until Amreg(0,2)<1
  319. End 
  320.  
  321.  
  322.  
  323.   The AMOS Procedure Library is a library of procedures for use in AMOS
  324. programs.  (Surprise, surprise... :-) )  The procedures were submitted to me
  325. by various people on the AMOS list.  They can be easily merged into your
  326. AMOS programs to save you the time of writing them yourself.  The latest
  327. version of the Procedure Library can be found on AmiNet as
  328. dev/amos/ProcLib20.lha .
  329.  
  330.   I accept any kind of procedure, large or small.  However, Paul Hickman
  331. came up with the concept of Screen Eaters at one point - routines which
  332. clear the screen in interesting ways.  I was hoping to see some more of
  333. those (hint, hint), and possibly their counterparts, Screen Vomiters.
  334.  
  335. Date: 1 Oct 93 12:06:00 EST
  336. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  337. Subject: Procedure Library v1.0
  338. To: "amos-list" <amos-list@ccess.digex.net>
  339.  
  340.   I am in the process of uploading the initial release of the AMOS Procedure
  341. Library to AMINET.  I've run into some problems, but I expect the library to
  342. be available in 2-3 days.  The file is:
  343.  
  344. /pub/AMINET/dev/amos/ProcLib.lha
  345.  
  346.   Below is the list of procedures in the library. (ver 1.0)
  347.   A recent list should be sent to THE AMOS EMAIL LIST as soon as it is ready.
  348.  
  349.   --Andy Church
  350. ----------------------------
  351. _DOSERROR[ERR]
  352.   Returns the AmigaDOS error message for the given error code.
  353. _FAST_ELLIPSE[XC,YC,RX,RY,_FILLED]
  354.   Draws an ellipse using integer math.
  355. _FAST_LINE[X1,Y1,X2,Y2]
  356.   Draws a line using integer math.
  357. _MAKEMASK[_SCREEN,_COLOUR,TEMP1,TEMP2,X1,Y1,X2,Y2,_ICON]
  358.   Makes a mask for an icon with a given transparent colour.
  359. OPENFONT[NAME$,SIZE,_REM]
  360.   Opens or closes a font.
  361. _PALETTE_TO_ANTIQUE[_SCREEN]
  362.   Converts palette to "antique photograph" colours.
  363. _PALETTE_TO_BW[_SCREEN]
  364.   Converts palette to black and white.
  365. _PALETTE_TO_NEGATIVE[_SCREEN]
  366.   Converts palette to negative colours.
  367. _SEPARATE_RGB[_SCREEN,X]
  368.   Filters colours in picture.
  369. _SHADOW_TXT[X,Y,_FG,_BG,_TXT$]
  370.   Writes shadowed text to the screen.
  371. _TO_NTSC
  372.   Switches display to NTSC mode.
  373. _TO_PAL
  374.   Switches display to PAL mode.
  375.  
  376.  
  377. Date: 21 Sep 93 17:40:00 EST
  378. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  379. Subject: Procedure library (again)
  380. To: "amos-list" <amos-list@ccess.digex.net>
  381.  
  382.   When you send me a procedure for inclusion in the library, please also
  383. include a short "readme" file (like those on AMINET) that describes what the
  384. procedure's function is.  If possible, I'd also like an example program that
  385. I can use to test the procedure, just to make sure it works.
  386.  
  387.   I'd prefer that you use the following format for your readme file:
  388.  
  389. [Required items]
  390. NAME_OF_PROCEDURE
  391.   Description   : A short description of the procedure's function.  1 or 2
  392.                       sentences should be enough in most cases.
  393.   Calling format: How to call the procedure, and what its parameters are.  E.g.
  394.                   MYPROC[num1,num2,sumadr]
  395.                       num1,num2 - numbers to work with
  396.                       sumadr    - ADDRESS of sum (use Varptr())
  397.   Return value  : What your procedure returns.  If none, write "None".
  398.   Author        : Your name, and your e-mail address.
  399. [Optional item]
  400.   Special notes : If your procedure only works with AMOS Pro, or if it requires
  401.                       a special library, or another procedure, say so here.  If
  402.                       there's anything else you think I should know, put that
  403.                       here too.
  404.  
  405.   --Andy Church
  406.  
  407.  
  408. team@lick.clare.tased.edu.au
  409.  
  410. Date: 22 Sep 1993 17:36:23 -0500 (EST)
  411. From: Tom Plackowski <tom@lms.concept.com.au>
  412. Subject: Re: SoundFX
  413.  
  414. >Hello, I need some SFX (fairley small if possible) for my game.
  415. >Some good explosions, missile and changun sounds, and the sound of
  416. >a helicopters rotor.
  417.  
  418. >Does anyone have or know where I can get sounds like these?
  419.  
  420. Have a poke around at:
  421.  
  422.       SOUNDS.SDSU.EDU
  423.  
  424. This is their readme:
  425.  
  426. This is the brand new (well, almost...) machine which will provide access
  427. to the sun sounds archive.
  428.  
  429. All sounds are in /sounds.
  430.  
  431. ATTENTION FRIENDLY HELPFUL ARCHIVE USERS:
  432. I am in need of some help.  As you will notice, each directory now contains
  433. a file called 'INDEX' which is a list of the sounds in that directory
  434. with an optional description.  This discription is to be gotten from the
  435. header of the sound file.  My request is: Most sounds do not have an sort
  436. of info with them.  Could you be so kind to send me some descriptions of
  437. sounds so that I can add them to the headers?  This would really help out
  438. me and other people as well.
  439. The INDEX files are generated nightly by a program I wrote called soundinfo
  440. This program is also available for anonymous ftp in /pub/soundinfo.shar
  441. It also allows one to change the header info string of a sound.
  442.  
  443. If you have a request for a certain song, please don't mail the request to
  444. me since I am not very likely to have the song on CD.  However, you put
  445. requests in the /sound_requests directory.  If everyone with record
  446. abilities will look in that directory every once in a while and record
  447. some of the requested sounds, it would make a lot of people a lot happier.
  448. (If you do upload a sound that was requested, please remove the original
  449. request, so multiple people do not upload the same sound...)
  450.  
  451. If you want to know how to play these sounds, how to convert them, or
  452. how to annoy other people with them, please read the README.sounds
  453. file in this directory.
  454.  
  455. As always keep those sounds coming!
  456. Always upload new sounds in /incoming, please.
  457. I would very much like to expand the database of sound effects, cartoon
  458. sounds and things like that, so if you have some, upload them!
  459.  
  460. If you have questions/comments/money, send mail to turtle@ciences.sdsu.edu
  461.  
  462. --Andrew
  463. ____________________________________________________________________________
  464. Andrew "Race Turtle" Scherpbier, SysMgr
  465. College of Sciences
  466. San Diego State University
  467. turtle@ciences.sdsu.edu
  468. Voice: (619) 594-5026
  469. Fax:   (619) 594-6381
  470.  
  471.  
  472. // Tom
  473.  
  474. From: sfmcnally@IX.com
  475. Subject: Bitplanes
  476. To: amos-list@ccess.digex.net
  477.  
  478. Well, bitplanes are how all graphics on the Amiga are stored.
  479. (If you understand Binary numbers it's quite simple)
  480.  
  481. Every image is made up of a number of bitplanes according to how many
  482. colors it uses, 1 bitplane for 2 colors, 2 planes for 4 colors,
  483. 3 planes for 8 colors, and 5 and 6 planes for 32 and 64 colors.
  484. (You can allso go to 7 and 8 planes for 128 and 256 colors on AGA
  485. machines)
  486.  
  487. In every bitplane, one bit represents one pixel, so a byte (8 bits)
  488. of a bitplane would be 8 pixels across.
  489. At it's simplest, with one bit plane wherever there's a set bit 
  490. in the bitplane that pixel will be in color 1, a binary 0 in
  491. one of the bits means color 0 at that pixel.
  492.  
  493. To get more colors the system adds up the bits of all the planes
  494. at a certian pixel and that makes the color number.
  495. Say at pixel A plane 1 is set to 0, plane 2 is set to 1, and plane
  496. 3 is set to 1, combining those will make the binary number %011
  497. which is 6 in normal numbers, so at that pixel there would be
  498. color 6.
  499.  
  500. Now to change the colors of bobs you can tell the blitter NOT
  501. to draw certian planes, so if in the above example you told the
  502. blitter NOT to draw plane 2 the color would be %001, or 4.
  503.  
  504. Now for a turtle on a 16 color screen, you should draw the turtle
  505. images in color 15, 15 is %1111 in binary, so then you can change
  506. the turtle to ANY color JUST by not drawing certian combinations
  507. of planes on the screen!   :)
  508.  
  509. Lets see...  ::going for manual::
  510.  
  511. Ok, if you have a bob drawn in color 15, on a 16 color screen,
  512. this bit of code will draw the bob in color "COLOR":
  513.  
  514. Set Bob 1,,COLOR,
  515. Bob 1,X,Y,TURTLE_IMAGE
  516.  
  517.  
  518. Where turtle_image is the image number for the turtle.
  519.  
  520.  
  521. :)
  522.  
  523. Seumas
  524.  
  525.                     ------------------------
  526.  
  527. Date: 27 Sep 93 21:23:00 EST
  528. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  529. Subject: Re: Bitplanes
  530. To: "amos-list" <amos-list@ccess.digex.net>
  531.  
  532.   A little clarification here...
  533.  
  534. >In every bitplane, one bit represents one pixel, so a byte (8 bits)
  535. >of a bitplane would be 8 pixels across.
  536. >At it's simplest, with one bit plane wherever there's a set bit 
  537. >in the bitplane that pixel will be in color 1, a binary 0 in
  538. >one of the bits means color 0 at that pixel.
  539.  
  540.   This is right.  However...
  541.  
  542. >To get more colors the system adds up the bits of all the planes
  543. >at a certian pixel and that makes the color number.
  544. >Say at pixel A plane 1 is set to 0, plane 2 is set to 1, and plane
  545. >3 is set to 1, combining those will make the binary number %011
  546. >which is 6 in normal numbers, so at that pixel there would be
  547. >color 6.
  548.  
  549.   This is wrong -- you're numbering the planes backwards.  What you should
  550. have said is this:
  551.  
  552. Say at pixel A plane *2* is set to 0, plane *1* is set to 1, and plane
  553. *0* is set to 1, combining those...
  554.  
  555.   The plane number is the same as the bit number in the colour.  So plane 0
  556. corresponds to bit 0 (the least significant bit), plane 1 corresponds to bit
  557. 1, etc.
  558.  
  559.   You also don't know as much about binary as you seem to think you know.  The
  560. binary number 011 is equal to 3 in decimal (0*2^2 + 1*2^1 + 1*2^0 = 0+2+1 = 3).
  561.  
  562. >Now to change the colors of bobs you can tell the blitter NOT
  563. >to draw certian planes, so if in the above example you told the
  564. >blitter NOT to draw plane 2 the color would be %001, or 4.
  565.                                                       ^^^^ NO!!! 1, not 4!!!
  566.  
  567.   You'd tell it not to draw plane 1 in order to get %001 from the above case.
  568. That is, you'd use "Set Bob N,,%11111101," where N is your bob number.
  569.  
  570.   --Andy Church
  571.  
  572.  
  573. Date: 27 Sep 93 21:34:00 EST
  574. From: "Andrew Church" <95ACHURCH@ax.mbhs.edu>
  575. Subject: Re: Use of Varptr
  576. To: "amos-list" <amos-list@ccess.digex.net>
  577.  
  578. >  Last night I was stuffing around with passing Varptr's as parameters to
  579. >procedures, trying to pass the address of an array of floating point numbers.
  580. >The problem is that I couldn't just Poke(Varptr(ARRAY)+OFFSET) to get to
  581. >ARRAY(OFFSET).  I noticed that each successive Varptr was 4 units apart, and
  582. >this morning I realized why the values I Poked weren't what was stored.
  583. >  So could someone tell me 
  584.  
  585. >* How to use Varptr, Poke and Peek to store (properly) and read from an array
  586. >  of integers?
  587.  
  588.   Writing: Loke Varptr(ARRAY(0))+ELEMENT*4,_VALUE
  589.   Reading: _VALUE=Leek(Varptr(ARRAY(0))+ELEMENT*4)
  590.  
  591. where ELEMENT is the element number you're using, just like ARRAY(ELEMENT).
  592.  
  593.   Of course, this is only useful if you've passed the array address, as in
  594.  
  595. _PROCEDURE[Varptr(ARRAY(0))]
  596.  
  597. since otherwise you can just use _VALUE=ARRAY(ELEMENT).
  598.  
  599. >* How to use Varptr, Poke and Peek to store (properly) and read from an array
  600. >  of floats? (Ie, the set up of the float, such as the mantissa length...that
  601. >  sort of garbage, and where they are stored wrt the array's adress).
  602.  
  603.   They're also stored as 4-byte values, so use the same scheme I described
  604. above to access them.
  605.  
  606.   The format depends on whether you're using Creator or Pro.  Creator uses FFP:
  607.  
  608.   31                     876     0
  609.   | - - - mantissa - - - |S| exp |
  610.  
  611. where m is the mantissa (with an assumed binary point after the first digit),
  612. S is the sign bit and exp is the bias-64 exponent.  In other words,
  613.     exp = exponent+64
  614.  
  615.   Pro, on the other hand, uses IEEE single-precision.  I'm not entirely sure
  616. about the format for IEEE floats.  If you use Set Double Precision, that
  617. switches Pro to 8-byte double-precision floats, which is something completely
  618. different.
  619.  
  620.   --Andy Church
  621.  
  622.  
  623. Subject: Menus & multitasking
  624. To: amos-list@ccess.digex.net
  625. Date: Tue, 5 Oct 1993 10:44:22 +0200 (EET)
  626.  
  627. I think I found bug in AMOS menus.
  628. If I try something like this:
  629.  
  630. Screen Close 0
  631. BEGIN:
  632. Screen Open 0,320,200,16,Lowres
  633. Menu$(1)="First menu"
  634. Menu On 
  635. Wait Key 
  636. Menu Off 
  637. Screen Close 0
  638. Screen Open 1,320,200,16,Lowres
  639. Print "This is screen 1"
  640. Wait Key 
  641. Screen Close 1
  642. Goto BEGIN
  643.  
  644. ...and while the program is running, go to WB, and close a window or
  645. screen, the AMOS program will give "Screen not opened"-error.
  646. Is this a bug, or is there something I should know about using menus
  647. with temporary screens ?
  648.  
  649. Mikko
  650.  
  651.  
  652. Aminet is a huge colection of amiga pd stuff, it is mirrowed to a lot 
  653. places here is a list:
  654.  
  655. Country           Site                                        Directory
  656. SCANDINAVIA       ftp.luth.se                                 pub/aminet/
  657. SWITZERLAND       amiga.physik.unizh.ch                       pub/aminet/
  658. SWITZERLAND       litamiga.epfl.ch                            pub/aminet/
  659. GERMANY           ftp.uni-kl.de                               pub/aminet/
  660. GERMANY           ftp.cs.tu-berlin.de                         pub/aminet/
  661. GERMANY           ftp.th-darmstadt.de                         pub/aminet/
  662. USA               ftp.etsu.edu                                pub/aminet/
  663. USA               ftp.wustl.edu                               pub/aminet/
  664. USA               oes.orst.edu                                pub/aminet/
  665.  
  666.  
  667.  
  668.  
  669. '                             (AMAL FUNCTION)  =BOB COL(N,S,E)
  670. (AMAL FUNCTION)  =C(N)        (AMAL FUNCTION)  =J0
  671. (AMAL FUNCTION)  =J1          (AMAL FUNCTION)  =K1
  672. (AMAL FUNCTION)  =K2          (AMAL FUNCTION)  =SPRITE COL(N,S,E)
  673. (AMAL FUNCTION)  =V(V)        (AMAL FUNCTION)  =XH (S,X)
  674. (AMAL FUNCTION)  =XM          (AMAL FUNCTION)  =XS(S,X)
  675. (AMAL FUNCTION)  =YH (S,Y)    (AMAL FUNCTION)  =YM
  676. (AMAL FUNCTION)  =YS(S,X)     (AMAL FUNCTION)  =Z(N)
  677. (AMAL)  AUTOTEST              (AMAL)  ANIM
  678. (AMAL)  END                   (AMAL)  FOR TO NEXT
  679. (AMAL)  IF                    (AMAL)  JUMP
  680. (AMAL)  LET                   (AMAL)  MOVE
  681. (AMAL)  PLAY                  (AMAL)  PAUSE
  682. (BOB)  PRIORITY REVERSE ON-OFF=COLOUR
  683. =WINDON                       ABS
  684. ACOS                          ADD
  685. AMAL FREEZE                   AMAL OFF
  686. AMAL ON                       AMAL
  687. AMALERR                       AMOS HERE
  688. AMOS LOCK                     AMOS TO BACK
  689. AMOS TO FRONT                 AMOS UNLOCK
  690. AMPLAY                        AMREG
  691. ANIM FREEZE                   ANIM OFF
  692. ANIM ON                       ANIM ON-OFF
  693. ANIM                          APPEAR
  694. APPEND                        AREG
  695. ASC                           AT
  696. ATAN                          AUTO VIEW
  697. AUTOBACK                      AMAL IMPORTANT INFO
  698. AUTHOR NOTE ON =COL(BOB)      BANK SWAP
  699. BANK TO MENU                  BAR
  700. BCHG                          BCLR
  701. BELL                          BGRAB
  702. BIN$                          BLOAD
  703. BOB CLEAR                     BOB COL
  704. BOB DRAW                      BOB OFF
  705. BOB UPDATE                    BOB
  706. BOB/SPRITE FLIPPING           BOBSPRITE COL
  707. BOOM                          BORDER
  708. BORDER$                       BOX
  709. BREAK OFF                     BREAK ON
  710. BREAK ON-OFF                  BSAVE
  711. BSET                          BTST
  712. CALL                          CDOWN
  713. CDOWN$                        CENTRE
  714. CHANAN                        CHANGE MOUSE
  715. CHANMV                        CHANNEL N TO BOB B
  716. CHANNEL N TO RAINBOW R        CHANNEL N TO SCREEN DISPLAY D
  717. CHANNEL N TO SCREEN OFFSET D  CHANNEL N TO SCREEN SIZE S
  718. CHANNEL N TO SPRITE S         CHANNEL
  719. CHOICE                        CHR$
  720. CIRCLE                        CLEAR KEY
  721. CLEFT                         CLEFT$
  722. CLINE                         CLIP
  723. CLOSE EDITOR                  CLOSE WORKBENCH
  724. CLOSE                         CLS
  725. CLW                           CMOVE
  726. COL                           COLOUR
  727. COP LOGIC                     COP MOVE
  728. COP MOVEL                     COP RESET
  729. COP SWAP                      COP WAIT
  730. COPPER OFF                    COPPER ON
  731. COPY                          COS
  732. CRIGHT                        CRIGHT$
  733. CUP                           CUP$
  734. CURS ON-OFF                   CURS PEN
  735. DATA                          DEC
  736. DEEK                          DEF FN
  737. DEF SCROLL                    DEFAULT PALETTE
  738. DEFAULT                       DEGREE
  739. DEL BLOCK                     DEL CBLOCK
  740. DEL ICON                      DEL SPRITE
  741. DEL WAVE                      DEV FIRST$
  742. DEV NEXT$                     DFREE
  743. DIM                           DIR FIRST$
  744. DIR NEXT$                     DIR
  745. DIR$                          DIRECT
  746. DISC INFO$                    DISPLAY HEIGHT
  747. DO                            DO...LOOP
  748. DOKE                          DOSCALL
  749. DOUBLE BUFFER                 DRAW
  750. DREG                          DUAL PLAYFIELD
  751. DUAL PRIORITY                 EDIT
  752. ELLIPSE                       ELSE
  753. END IF                        END PROC
  754. END                           EOF
  755. ERASE                         ERRN
  756. ERROR                         EVERY OFF
  757. EVERY ON                      EVERY N GOSUB
  758. EVERY N PROC                  EXECALL
  759. EXIST                         EXIT IF
  760. EXIT                          EXP
  761. EMBEDDED MENU COMMANDS        FADE
  762. FALSE                         FIELD
  763. FILL                          FIRE
  764. FIX                           FLASH
  765. FLIP$                         FN
  766. FONT$                         FOR
  767. FOR...NEXT                    FREE
  768. FSEL$                         GET BLOCK
  769. GET BOB                       GET CBLOCK
  770. GET DISC FONTS                GET FONTS
  771. GET ICON PALETTE              GET ICON
  772. GET PALETTE                   GET ROM FONTS
  773. GET SPRITE PALETTE            GET SPRITE
  774. GET                           GFXCALL
  775. GLOBAL                        GOSUB
  776. GOTO                          GR LOCATE
  777. GR WRITING                    GETTING THE SYSTEM DATE
  778. GETTING THE SYSTEM TIME       HCOS
  779. HEX$                          HIDE
  780. HOME                          HOT SPOT
  781. HREV BLOCK                    HSCROLL
  782. HSIN                          HSLIDER
  783. HTAN                          HUNT
  784. HZONE                         I BOB
  785. I SPRITE                      ICON BASE
  786. IF                            IF...THEN...[ELSE]
  787. INC                           INK
  788. INKEY$                        INPUT
  789. INPUT#                        INPUT$
  790. INPUT$(N)                     INSTR
  791. INT                           INTCALL
  792. INVERSE ON-OFF                IMPORTANT TRACKER NOTES:
  793. JDOWN                         JLEFT
  794. JOY                           JRIGHT
  795. JUP                           KEY SHIFT
  796. KEY SPEED                     KEY STATE
  797. KEY$                          KILL
  798. KEYBOARD MACROS               LACED
  799. LDIR                          LED
  800. LEEK                          LEFT$
  801. LEN                           LENGTH
  802. LIMIT BOB                     LIMIT MOUSE
  803. LINE INPUT                    LINE INPUT#
  804. LISTBANK                      LN
  805. LOAD IFF                      LOAD
  806. LOCATE                        LOF
  807. LOG                           LOGBASE
  808. LOGIC                         LOKE
  809. LOOP                          LOWER$
  810. LPRINT                        MAKE ICON MASK
  811. MAKE MASK                     MATCH
  812. MAX                           MEMORIZE
  813. MENU ACTIVE                   MENU BAR
  814. MENU BASE                     MENU CALC
  815. MENU CALLED                   MENU DEL
  816. MENU INACTIVE                 MENU ITEM MOVABLE
  817. MENU ITEM STATIC              MENU KEY
  818. MENU LINE                     MENU LINK
  819. MENU MOUSE                    MENU MOVABLE
  820. MENU OFF                      MENU ON
  821. MENU ONCE                     MENU SEPARATE
  822. MENU STATIC                   MENU TLINE
  823. MENU TO BANK                  MENU X
  824. MENU Y                        MENU$
  825. MID$                          MIN
  826. MKDIR                         MOUSE CLICK
  827. MOUSE KEY                     MOUSE ZONE
  828. MOVE FREEZE                   MOVE OFF
  829. MOVE ON                       MOVE ON-OFF
  830. MOVE X                        MOVE Y
  831. MOVON                         MULTI WAIT
  832. MUSIC OFF                     MUSIC STOP
  833. MUSIC                         MVOLUME
  834. MEMORY BANKS                  NEXT
  835. NO ICON MASK                  NO MASK
  836. NOISE                         NOT
  837. NTSC                          ON ERROR GOTO
  838. ON ERROR PROC                 ON MENU DEL
  839. ON MENU GOSUB                 ON MENU GOTO
  840. ON MENU OFF                   ON MENU ON
  841. ON MENU ON-OFF                ON MENU PROC
  842. ON...GOSUB                    ON...GOTO
  843. ON...PROC                     OPEN IN
  844. OPEN OUT                      OPEN PORT
  845. OPEN RANDOM                   PACK
  846. PAINT                         PALETTE
  847. PAPER                         PAPER$
  848. PARAM                         PARAM#
  849. PARAM$                        PARENT
  850. PASTE BOB                     PASTE ICON
  851. PEEK                          PEN
  852. PEN$                          PHYBASE
  853. PHYSIC                        PI#
  854. PLAY                          PLOAD
  855. PLOT                          POF
  856. POINT                         POKE
  857. POLYGON                       POLYLINE
  858. POP PROC                      POP
  859. PORT                          PRG FIRST$
  860. PRG NEXT$                     PRG STATE
  861. PRINT USING                   PRINT
  862. PRINT#                        PRIORITY OFF
  863. PRIORITY ON                   PRIORITY ON-OFF
  864. PROCEDURE                     PRUN
  865. PSEL$                         PUT BLOCK
  866. PUT BOB                       PUT CBLOCK
  867. PUT KEY                       PUT
  868. RADIAN                        RAIN
  869. RAINBOW DEL                   RAINBOW
  870. RANDOMIZE                     READ
  871. REM                           REMEMBER
  872. RENAME                        REPEAT
  873. REPEAT$                       REPEAT...UNTIL
  874. REQUEST OFF                   REQUEST ON
  875. REQUEST WB                    RESERVE ZONE
  876. RESERVE                       RESET ZONE
  877. RESTORE                       RESUME
  878. RETURN                        RIGHT$
  879. RND                           ROL
  880. ROR                           RUN
  881. SAM BANK                      SAM LOOP
  882. SAM PLAY                      SAM RAW
  883. SAM STOP                      SAM SWAP
  884. SAM SWAPPED                   SAMPLE
  885. SAVE IFF                      SAVE
  886. SAY                           SCAN$
  887. SCANCODE                      SCIN
  888. SCREEN BASE                   SCREEN CLONE
  889. SCREEN CLOSE                  SCREEN COLOUR
  890. SCREEN COPY                   SCREEN DISPLAY
  891. SCREEN HEIGHT                 SCREEN HIDE
  892. SCREEN OFFSET                 SCREEN OPEN
  893. SCREEN SHOW                   SCREEN SWAP
  894. SCREEN TO BACK                SCREEN TO FRONT
  895. SCREEN WIDTH                  SCREEN
  896. SCROLL                        SERIAL BITS
  897. SERIAL BUFFER                 SERIAL CHECK
  898. SERIAL CLOSE                  SERIAL ERROR
  899. SERIAL FAST                   SERIAL GET
  900. SERIAL INPUT$                 SERIAL OPEN
  901. SERIAL OUT                    SERIAL PARITY
  902. SERIAL SEND                   SERIAL SENDING TIPS
  903. SERIAL SLOW                   SERIAL SPEED
  904. SERIAL X                      SET BOB
  905. SET BUFFER                    SET CURS
  906. SET DIR                       SET ENVEL
  907. SET FONT                      SET INPUT
  908. SET LINE                      SET MENU
  909. SET PAINT                     SET PATTERN
  910. SET RAINBOW                   SET SLIDER
  911. SET SPRITE BUFFER             SET TAB
  912. SET TALK                      SET TEMPRAS
  913. SET TEXT                      SET WAVE
  914. SET ZONE                      SGN
  915. SHADE ON-OFF                  SHARED
  916. SHIFT DOWN                    SHIFT OFF
  917. SHIFT UP                      SHOOT
  918. SHOW                          SIN
  919. SLOAD                         SORT
  920. SPACE$                        SPACK
  921. SPRITE BASE                   SPRITE COL
  922. SPRITE OFF                    SPRITE UPDATE
  923. SPRITE                        SPRITEBOB COL
  924. SQR                           START
  925. STEP                          STR$
  926. STRING$                       SWAP
  927. SYNCHRO                       SYSTEM
  928. SAFE AMIGADOS EXECUTE         SPRITES
  929. TAB$                          TAN
  930. TEMPO                         TEXT BASE
  931. TEXT LENGTH                   TEXT STYLES
  932. TEXT                          THEN
  933. TIMER                         TITLE BOTTOM
  934. TITLE TOP                     TRACK LOAD
  935. TRACK LOOP ON-OFF             TRACK PLAY
  936. TRACK STOP                    TRUE
  937. THE EDITOR                    UNDER ON-OFF
  938. UNPACK                        UNTIL
  939. UPDATE EVERY                  UPDATE
  940. UPPER$                        VAL
  941. VARPTR                        VIEW
  942. VOICE                         VOLUME
  943. VREV BLOCK                    VSCROLL
  944. VSLIDER                       VUMETER
  945. WAIT KEY                      WAIT VBL
  946. WAIT                          WAVE
  947. WEND                          WHILE
  948. WHILE...WEND                  WIND CLOSE
  949. WIND MOVE                     WIND OPEN
  950. WIND SAVE                     WIND SIZE
  951. WINDOW                        WRITING
  952. X BOB                         X CURS
  953. X GRAPHIC                     X HARD
  954. X MOUSE                       X SCREEN
  955. X SPRITE                      X TEXT
  956. XGR                           Y BOB
  957. Y CURS                        Y GRAPHIC
  958. Y HARD                        Y MOUSE
  959. Y SCREEN                      Y SPRITE
  960. Y TEXT                        YGR
  961. ZONE                          ZONE$
  962. ZOOM                          
  963.  
  964.  
  965. Function keys: f1 - f10
  966.  
  967.  Run          Test         Indent       Blocks Menu    Search Menu
  968.  Run Other    Edit Other   Overwrite    Fold/Unfold    Line Insert
  969.  
  970. (Function Keys)  With Shift or Right Mouse.
  971.  Load         Save         Save As      Merge          Merge ASCII
  972.  Ac.New/Load  Load Others  New Others   New            Quit
  973.  
  974. (Function Keys)  With Ctrl.
  975.  Block Start  Block Cut    Block Move   Block Hide     Save ASCII
  976.  Block End    Block Paste  Block Store  Block Save     Block Print
  977.  
  978. (Function Keys)  With Alt.
  979.  Find         Find Next    Find Top     Replace         Replace All
  980.  Low<>Up      Open All     Close All    Set Text B.     Set Tab
  981.  
  982. Special Editor Keys and Functions
  983.  Esc                     Toggle Direct Mode and Edit Screen
  984.  Shift+Back or Ctrl+Y    Delete current line and pull up text
  985.  Ctrl+U                  Undo, when in Overwrite mode
  986.  Ctrl+Q                  Erase text from cursor to end of line
  987.  Ctrl+I                  Insert line at cursor
  988.  
  989. Cursor Keys
  990.  Shift+Left              Previous word
  991.  Shift+Right             Next word
  992.  Shift+Up                Top of page
  993.  Shift+Down              Bottom of page
  994.  Ctrl+Up                 Up one page
  995.  Ctrl+Down               Down one page
  996.  Shift+Ctrl+Up           Top of text
  997.  Shift+Ctrl+Down         Bottom of text
  998.  
  999. Program Control
  1000.  Amiga+P  Push program into memory and create a new one
  1001.  Amiga+F  Flip between two programs in memory
  1002.  Amiga+T  Display next program
  1003.  
  1004. Cut and Paste
  1005.  Ctrl+B   Set beginning of block
  1006.  Ctrl+E   Set end of block
  1007.  Ctrl+C   Cut block
  1008.  Ctrl+M   Move block
  1009.  Ctrl+S   Save block
  1010.  Ctrl+P   Paste block
  1011.  Ctrl+H   Hide block
  1012.  
  1013. Marks
  1014.  Ctrl+Shift+n    Set mark.  n = 0 to 9
  1015.  Ctrl+n          Goto mark n
  1016.  
  1017. Search/Replace
  1018.  Alt+Up     Search up for next label or procedure
  1019.  Alt+Down   Search down for next label or procedure
  1020.  Ctrl+F     Find text string
  1021.  Ctrl+N     Find next string
  1022.  Ctrl+R     Replace text
  1023.  
  1024. Tabs
  1025.  Tab        Move to next tab
  1026.  Shift+Tab  Move to last tab
  1027.  Ctrl+Tab   Set/Unset Tab
  1028.  
  1029. Key$(n)=command$
  1030. command$=Key$(n)
  1031.  
  1032. Assign Macro in command$ to function key n.  Keys 11-20 are accessed
  1033. by holding down the left Amiga key at the same time.  Alt. + ' will be
  1034. interpreted as a return.
  1035.  
  1036. x$=Scan$(n[,m])
  1037.  
  1038. n is the scancode of a key to be used in a macro string and m is a
  1039. mask to set special keys.
  1040.  
  1041.    Bit   Special Key
  1042.  
  1043.     0    Left SHIFT key
  1044.     1    Right SHIFT key
  1045.     2    Caps Lock (ON or OFF)
  1046.     3    Control
  1047.     4    Left Alt
  1048.     5    Right Alt
  1049.     6    Left Amiga
  1050.     7    Right Amiga
  1051.  
  1052. Saves about 40k of memory.
  1053.  
  1054. Saves about 28k of memory.
  1055.  
  1056. Set Buffer n
  1057.  
  1058. n represents the variable buffer size in kilobytes.  Must be the first
  1059. line in your program excluding REMs
  1060.  
  1061. t=Free
  1062.  
  1063. Returns amount of available variable space
  1064.  
  1065. Dim var(x,y,z,...)[,var$(x,y),var#(x)]
  1066.  
  1067. This creates a table of variables or strings for usage.  These tables
  1068. may have as many dimensions as you want, but each dimension is limited
  1069. to a maximum of 65,000 elements.
  1070.  
  1071. In order to access an element in an array you simply put the element's
  1072. (x,y) in brackets after the variable name.
  1073.  
  1074. Example:  a$=var$(x,y)  a=var(1,3)
  1075.  
  1076. See your manual pages 35-38 for variable definations.
  1077.  
  1078. Data list of items[,more items]
  1079.  
  1080. This statement allows you to set up date fields to be read in by the
  1081. READ command.  Please Note, if the data field is without quotes, it
  1082. may be mistaken for a variable or expression.
  1083.  
  1084. For further notes on READ and DATA types check your manual page 256.
  1085.  
  1086. Read list of variables
  1087.  
  1088. Read will read to the list of variables a list of data items.  These
  1089. items MUST be the same type [string or variable] otherwize an error will
  1090. occur.
  1091.  
  1092. Also see RESTORE and DATA.  For further notes, see page 256 of your
  1093. manual.
  1094.  
  1095. d$=Left$(s$,n)  or  Left$(d$,n)=s$
  1096.  
  1097. d$=Right$(s$,n)  or  Right$(d$,n)=s$
  1098.  
  1099. d$=Mid$(s$,p,n)  or  Mid$(d$,p,n)=s$
  1100.  
  1101. If n is not specified then from p to end of string will be affected.
  1102.  
  1103. f=Instr(d$,s$ [,p])
  1104.  
  1105. Search for s$ in d$.  p is the starting position of the search.
  1106.  
  1107. s$=Upper$(n$)   Convert n$ into all upper case.
  1108.  
  1109. s$=Lower$(n$)   Convert n$ into all lower case
  1110.  
  1111. f$=Flip$(n$)   Reverse order of n$
  1112.  
  1113. s$=Space$(n)   s$ will be a string of n spaces
  1114.  
  1115. s$=String$(a$,n)   s$ will be the first character of a$ repeated n times
  1116.  
  1117. s$=Chr$(n)   Return ASCII character n
  1118.  
  1119. c=Asc(a$)   Return ASCII code for a$
  1120.  
  1121. l=Len(a$)   Return length of a$
  1122.  
  1123. v=Val(x$)   Convert string to a number
  1124.  
  1125. s$=Str$(x)   Convert number to a string
  1126.  
  1127. Sort a(0)  Sort a#(0)  Sort a$(0)
  1128.  
  1129. Sorts array a in ascending order.  "(0)" must be included
  1130.  
  1131. r=Match(t(0),s)  r=Match(t#(0),s#)  r=Match(t$(0),s$)
  1132.  
  1133. Search array t for s and return position to r
  1134.  
  1135. Inc var    Add one to var  (faster then  var=var+1)
  1136.  
  1137. Dec var    Subtract one from var  (faster then  var=var-1)
  1138.  
  1139. Add v,exp [,base To top]    (eg. Add v,150)  v must be an integer
  1140.  
  1141. The second version of ADD works like so:
  1142.     v=v+a
  1143.     If v<Base Then v=Top
  1144.     If v>Top Then v=Base
  1145.  
  1146. c#=Acos(n#)
  1147.  
  1148. The ACOS function takes a number between -1 & +1 and calculates the
  1149. angle which would be needed to generate this value with COS.
  1150.  
  1151. c#=Cos(a)
  1152. c#=Cos(a#)
  1153.  
  1154. The cosine function computes the cosine of an angle.  Normally all
  1155. angles are measured in RADIANs.  This may be changed using the DEGREE
  1156. command.
  1157.  
  1158. t#=Tan(a)
  1159. t#=Tan(a#)
  1160.  
  1161. TAN generates the tangent of an angle.  Examples:
  1162.  
  1163. DEGREE : PRINT Tan(45)
  1164.  0.9999998
  1165. RADIAN : PRINT Tan(PI#/8)
  1166.  .04141
  1167.  
  1168. s#=Sin(a)
  1169. s#=Sin(a#)
  1170.  
  1171. The Sin function calculates the sine of the angle in a.  Note that this
  1172. function always returns a floating point number.
  1173.  
  1174. t#=Atan(n#)
  1175.  
  1176. ATAN returns the Arc TANgent of a number.
  1177.  
  1178. s#=Hsin(a)
  1179. s#=Hsin(a#)
  1180.  
  1181. HSIN computes the hyperbolic SINe of angle a.
  1182.  
  1183. c#=Hcos(a)
  1184. c#=Hcos(a#)
  1185.  
  1186. HCOS computes the hyperbolic coSINe of angle a.
  1187.  
  1188. t#=Htan(a)
  1189. t#=Htan(a#)
  1190.  
  1191. HTAN computes the hyperbolic TANgent of angle a.
  1192.  
  1193. Degree
  1194.  
  1195. Generally all angles are specified in RADIANs.  Since radians are rather
  1196. difficult to work with, it's possible to instruct AMOS to accept angles
  1197. in degrees.  From the execution point of DEGREE, AMOS will expect
  1198. DEGREES instead of RADIANS to all TRIG functions.
  1199.  
  1200. Radian
  1201.  
  1202. The Radian command instructs that AMOS is to receive all angles in
  1203. Radians.  [This is the default.]  Also see DEGREE.
  1204.  
  1205. r#=Log(v)
  1206. r#=Log(v#)
  1207.  
  1208. LOG returns the logarithm in base 10 (LOG10) of the expression in v/v#.
  1209.  
  1210. r#=Exp(e#)
  1211.  
  1212. Calculates exponential of e#.
  1213.  
  1214. r#=Ln(l#)
  1215.  
  1216. LN computes the natural or naperian LOGarithm of l#.
  1217.  
  1218. a#=Pi#   Gives the value for pi.
  1219.  
  1220. (Square root)
  1221.  
  1222. s#=Sqr(v)  Returns the square root of v.
  1223.  
  1224. (Absolute value)
  1225.  
  1226. r=Abs(v)
  1227. r#=Abs(v#)
  1228.  
  1229. Removes signs, so -1 would be 1.
  1230.  
  1231. (Convert floating point to integer)
  1232.  
  1233. i=Int(v#)  If v#=1.32 Then i=1
  1234.  
  1235. (Find the sign of a number)
  1236.  
  1237. s=Sgn(v)
  1238.  
  1239. Returns -1 if negative, 0 if 0, 1 if positive
  1240.  
  1241. v=Rnd(n)
  1242.  
  1243. Returns a random number between 0 and n inclusive. If n is less then 0
  1244. then the last random number will be repeated.
  1245.  
  1246. Randomize seed
  1247.  
  1248. Set seed for random number generator.  Common pratice is Randomize
  1249. TIMER.
  1250.  
  1251. r=Max(x,y)   R#=Max(x#,y#)   r$=Max(x$,y$)
  1252.  
  1253. Returns the largest value of either x or y.
  1254.  
  1255. r=Min(x,y)   r#=Min(x#,y#)   r$=Min(x$,y$)
  1256.  
  1257. Returns smallest value of either x or y.
  1258.  
  1259. Swap x,y   Swap x#,y#   Swap x$,y$
  1260.  
  1261. Swap data between two variables of the same type.
  1262.  
  1263. Fix (n)
  1264.  
  1265. Changes how floating point numbers are displayed.
  1266. If 0<n<16 then n number of decimal places will be displayed.
  1267. If n>16 then printout will be proportional and trailing zeros removed.
  1268. If n=16 then format will be returned to normal
  1269. If n<0 then floating point numbers will be displayed in exponential
  1270. format and n determines the number of decimal places displayed.
  1271.  
  1272. Def Fn name [(list)]=expression
  1273.  
  1274. User defined function.  name is the name used to call the function,
  1275. list contains a list of variables separated by commas to be used in
  1276. the function, and expression is one line of functions.
  1277. (eg.  Def Fn Do_math (x,y,z)=10 * x + z / y  )
  1278.  
  1279. Fn name [(variable list)]
  1280.  
  1281. Execute user defined function. name is the name of the function and
  1282. variable list contains values to be passed to the function.
  1283.  
  1284. Poke address,v
  1285. Will place value v [1 byte only] into memory location address.
  1286.  
  1287. Doke address,v
  1288. Will place value v [2 bytes long] into memory location address. 
  1289. Address MUST be even or a crash will occur.
  1290.  
  1291. Loke address,v
  1292. Will place value v [4 bytes long] into memory location address.
  1293. Address MUST be even or a crash will occur.
  1294.  
  1295. WARNING:  Poking anything into the Amiga is DANGEROUS if you are NOT
  1296.           perfectly sure you're actually going where you want, so test
  1297.           your address in your program by printing it to the screen and
  1298.           doing a WAIT KEY prior to the Poke/Doke/Loke, so you can
  1299.           Ctrl-C the program, just incase the Address is wrong.
  1300.  
  1301. v=Peek(address)
  1302. Will return the value from address [1 byte only] into v.
  1303.  
  1304. v=Deek(address)
  1305. Will return the value from address [2 bytes long] into v.
  1306. Address MUST be even or a crash will occur.
  1307.  
  1308. v=Leek(address)
  1309. Will return the value from address [4 bytes long] into v.
  1310. Address MUST be even or a crash will occur.
  1311.  
  1312. Note for LEEK:  If bit 31 of the returned value is on, then v will show
  1313.                 as being negative.  [Bit 31 is the sign bit, 0 for
  1314.                 positive and 1 for negative.]
  1315.  
  1316. f=Hunt(start To finish,s$)
  1317.  
  1318. HUNT will search memory from start TO finish for s$.  If s$ is found, f
  1319. will hold the memory address of the start of s$, if not, f will hold 0.
  1320.  
  1321. ROR  Rotate Bits Right
  1322. ROL  Rotate Bits Left
  1323.  
  1324. .B Byte.  [ 8 bits]
  1325. .W Word.  [16 bits]
  1326. .L Long.  [32 bits]
  1327.  
  1328. Rol.B n,v  Will rotate the lowest 8 bits left one.  %10010000=%00100001
  1329. Ror.B n,v  Will rotate the lowest 8 bits right one. %10010000=%01001000
  1330.  
  1331. With .W [Word] and .L [Long], you can rotate more bits.
  1332.  
  1333. h$=Hex$(v [,places])
  1334.  
  1335. Set h$ to the hex value of v with places digits in length.
  1336.  
  1337. b$=Bin$(v [,places])
  1338.  
  1339. Set b$ to the binary value of v with places digits in length.
  1340.  
  1341. address=Varptr(v)
  1342. address=Varptr(v$)
  1343.  
  1344. Returns the address of variable v. Each type of variable is stored
  1345. using its own format:
  1346.  
  1347.  Integers: VARPTR finds the address of the four bytes containing the
  1348. contents of your variable.
  1349.  
  1350.  Floating point: VARPTR returns the location of four bytes which hold
  1351. the value of the variable in the IEEE single precision format.
  1352.  
  1353.  Strings: The VARPTR address points to the first character  of the
  1354. string.  Since AMOS Basic does not end its strings with a CHR$(0), you
  1355. must obtain the length of the string using something like:
  1356.  
  1357. DEEK(Varptr(a$)-2), where a$ is the name of your variable.  You could
  1358. also use LEN(a$).
  1359.  
  1360. Copy start,finish To destination
  1361.  
  1362. Move a section of data in memory.  The addresses must be even.
  1363.  
  1364. Fill start To finish, pattern
  1365.  
  1366. Fill an area of memory with the four bytes in pattern.  The addresses
  1367. must be even.
  1368.  
  1369. b=Btst(n,v)
  1370.  
  1371. Test the binary digit at position n in the variable v.  If it is 1,
  1372. then a value of -1(TRUE) will be returned.
  1373.  
  1374. Bset n,v
  1375.  
  1376. Set the bit at position n in variable v to 1.
  1377.  
  1378. Bclr n,v
  1379.  
  1380. Set the bit at position n in variable v to 0.
  1381.  
  1382. Bchg n,v
  1383.  
  1384. NOT the value of the bit at position n in variable v.
  1385.  
  1386.  One byte      Two bytes      Four bytes
  1387.  PEEK          DEEK           LEEK
  1388.  POKE          DOKE           LOKE
  1389.  
  1390. Areg(r)=a
  1391. a=Areg(r)
  1392.  
  1393. Areg() is a PSEUDO register to the 68000 chip's A0-A6 Address Registers.
  1394.  
  1395. Amos allows writing (Areg(r)=a) only to registers 0-2, but allows
  1396. reading (a=Areg(r)) for all 0-6.
  1397.  
  1398. Dreg(r)=a
  1399. a=Dreg(a)
  1400.  
  1401. Dreg() is a PSEUDO register to the 68000 chip's D0-D7 Data Registers.
  1402.  
  1403. Amos allows reading and writing from all 8 of these registers.
  1404.  
  1405. Notes:  When the AMOS commands CALL,DOSCALL,EXECALL,GFXCALL,INTCALL
  1406.         are executed, Areg(0)->Areg(2) and Dreg(0)->Dreg(7) are passed
  1407.         to the 68000's REAL registers.  Upon exit of the routine, Amos
  1408.         will read the 68000's REAL registers back into Areg(0)->Areg(2)
  1409.         and Dreg(0)->Dreg(7).  Also, Areg(3)->Areg(7) are reserved for
  1410.         use by Amos.
  1411.  
  1412. Pload "filename",bank
  1413.  
  1414. Reserves the selected memory bank and loads it with machine code.
  1415.  
  1416. bank is the bank number to be reserved for your machine code program. 
  1417. If it's negative, then the bank will be calculated using the absolute
  1418. value of this number and the required memory area will be allocated in
  1419. Chip memory.
  1420.  
  1421. Once you've loaded a program in this way, you can save it on disk as a
  1422. normal ".Abk" file, since the banks created in this manner are
  1423. permanent.  It will always be saved with your Amos program.
  1424.  
  1425. Your program must consist of machine code in standard Amiga format with
  1426. the following restrictions:
  1427.  
  1428. o The code MUST be relocatable, as it will be positioned at the first free
  1429.   memory location which is available.  [And probably never the same place
  1430.   twice.]
  1431.  
  1432. o  Only the CODE chunk of your program will be loaded.
  1433.  
  1434. o  The program MUST terminate with a single RTS instruction.
  1435.  
  1436. Call address[,params]
  1437. Call bank[,params]
  1438.  
  1439. Execute a machine code program at address or start of bank.
  1440.  
  1441. See AREG/DREG for details on Register usage.
  1442.  
  1443. Note, when machine code is running, all registers are available for use,
  1444. except A7 [Areg(7)].
  1445.  
  1446. A3 holds the address to the start of the params list.
  1447.  
  1448. All params will be pushed onto the stack at address A3.  Retrieving them
  1449. requires you to read pull them in reverse.  [See Manual Page 285 for
  1450. more information.]
  1451.  
  1452. A5 holds the address to the start of the MAIN Amos data area.
  1453.  
  1454. Before attempting these commands, be sure to observe warnings and
  1455. guidelines written in the Amiga ROM Kernel Manuals [RKMs].
  1456.  
  1457. x=Doscall(offset)  Execute a Dos Library call.
  1458. x=Execall(offset)  Execute an Exec Library call.
  1459. x=Gfxcall(offset)  Execute a Graphics Library call.
  1460. x=Intcall(offset)  Execute an Intuition Library call.
  1461.  
  1462. For information on Registers, see AREG/DREG.
  1463.  
  1464. offset should be negative.  Although the RKMs show them as being
  1465. positive, they are indeed supposed to be negative.
  1466.  
  1467. You should only attempt these commands if you're familar with the
  1468. Amiga's ROMs.
  1469.  
  1470. Restore label   Restore lable$   Restore line    Restore number
  1471.  
  1472. Wait n
  1473.  
  1474. n is measured in 50ths of a second.
  1475.  
  1476. v=Timer
  1477. Timer=v
  1478.  
  1479. TIMER is a reserved variable which is incremented by 1 every 50th of a
  1480. second.  It's most commonly used to help bring a random number:
  1481.  
  1482.           RANDOMIZE Timer
  1483.  
  1484. v=Not(d)
  1485.  
  1486. This does the same as an "Exclusive OR" which changes all the bits in a
  1487. digit to their opposite.
  1488.  
  1489. d=%101 : v=Not(d) : PRINT d
  1490.  
  1491. d will have %1111111111111010
  1492.  
  1493. v=True      Returns a value of -1.  [Try- a=0 : PRINT a=0]
  1494.  
  1495. v=False     Returns a value of 0.
  1496.  
  1497. HELLO           Procedure HELLO            pass no values to procedure
  1498. HELLO[n$,25]    Procedure HELLO[Name$,x]   pass values to procedure
  1499.  
  1500. End Proc
  1501. End Proc[variable]
  1502. End Proc[variable$]
  1503.  
  1504. End a Procedure.  Optional variables can be passed [ONLY one].  See
  1505. PARAM or PARAM$ for more information.
  1506.  
  1507. Global variable list
  1508.  
  1509. Let procedures use all variables in the variable list.
  1510.  
  1511. Shared variable list
  1512.  
  1513. Used inside of a procedure, lets procedure use program variables.
  1514. Similiar to GLOBAL but is contained to current procedure only.
  1515.  
  1516. Param, Param#, Param$
  1517.  
  1518. Lets a procedure store a value into the appropriate PARAM that can be
  1519. accessed by the main program.  This value is entered by the END PROC
  1520. command.   (eg. END PROC[a$+b$+g$])  Only one value can be returned.
  1521.  
  1522. Pop Proc
  1523.  
  1524. Jumps out of procedure
  1525.  
  1526. Goto label   Goto line number    Goto variable    Goto exp
  1527. (eg. Goto START_UP    Goto 210    Goto x    Goto a$ + "Hello" )
  1528.  
  1529. Gosub label   Gosub line number   Gosub variable  Gosub exp
  1530.  
  1531. Return
  1532.  
  1533. Exit from a subroutine.  Must be present in all subroutines.
  1534.  
  1535. Pop
  1536.  
  1537. Removes the return address generated by a GOSUB and allows you to exit
  1538. the subroutine any way you like.  (eg. IF x=1 Then Pop : Goto label  )
  1539.  
  1540. If conditions Then statements 1 [Else statements 2]
  1541.  
  1542. If...[Else]...End If
  1543.  
  1544. If tests=TRUE
  1545.     list of statements 1
  1546. Else
  1547.     list of statements 2
  1548. End If
  1549.  
  1550. Note: It is illegal to use an IF...THEN...ELSE inside an
  1551. IF...ELSE...END IF structured test.
  1552.  
  1553. For index = first To last [Step inc] : list of statements : Next index
  1554.  
  1555. While condition : list of statements : Wend
  1556.  
  1557. Repeat : list of statements : Until condition
  1558.  
  1559. DO : list of statements : LOOP
  1560.  
  1561. Exit [n]
  1562. Jumps out of the following structures: FOR...NEXT, REPEAT...UNTIL,
  1563. WHILE...WEND and DO...LOOP.  If n is stated then EXIT will jump out of
  1564. n number of nested structures.
  1565.  
  1566. Exit If
  1567. Exit If expression [,n]
  1568.  
  1569. Stops program and enters AMOS Basic editor.
  1570.  
  1571. Stops program and enters DIRECT mode.
  1572.  
  1573. Exits Amos immediately.  Closing any open files/screens/etc in the
  1574. process.
  1575.  
  1576. Stops program.
  1577.  
  1578. On v Proc proc1, proc2, proc3, ... proc n
  1579.  
  1580. Note: You can not pass parameters to a procedure using this command.
  1581.  
  1582. On v GOTO line1, line2, line3, ... line n
  1583.  
  1584. On v GOSUB line1, line2, line3, ... line n
  1585.  
  1586. Every n GOSUB label
  1587.  
  1588. Subroutine label will be executed every n 50ths of a second.  Your
  1589. subroutine must be completed in less then this time.  After a
  1590. subroutine has been entered, the system will be automatically
  1591. disabled.  The EVERY ON command must be used before the RETURN
  1592. statement in your subroutine.
  1593.  
  1594. Every n Proc
  1595. Every n Proc name
  1596.  
  1597. Every On   Every Off  Toggles automatic procedures and subroutines.
  1598.  
  1599. Break On   Break Off
  1600.  
  1601. Activate/deactivate the Ctrl+C function.
  1602.  
  1603. On Error Goto label
  1604.  
  1605. On Error Proc
  1606. On Error Proc name
  1607.  
  1608. When an error occurs, the program will jump to the GOTO/Proc.
  1609.  
  1610. Also see RESUME.
  1611.  
  1612. Resume          Continue with same command program errored with.
  1613. Resume Next     Continue 1 command after the command that caused the error.
  1614. Resume line     Continue at "line".  [Program must have line numbers.]
  1615. Resume label    Continue at label.
  1616.  
  1617. e=Errn
  1618.  
  1619. Returns the last error number.
  1620.  
  1621. Error n
  1622.  
  1623. Creates error number n.
  1624.  
  1625. Types of memory banks
  1626.  
  1627.   Class       Stores            Restrictions       Type
  1628.  
  1629.   Sprites     Sprites and Bobs  Only bank 1        Permanent
  1630.   Icons       Icons             Only bank 2        Permanent
  1631.   Music       Sound Tracks      Only bank 3        Permanent
  1632.   Amal        Amal data         Only bank 4        Permanent
  1633.   Samples     Sample data       Banks 1 - 15       Permanent
  1634.   Menu        Menu definition   Banks 1 - 15       Permanent
  1635.   Chip Work   Temp workspace    Banks 1 - 15       Temporary
  1636.   Chip Data   Perm workspace    Banks 1 - 15       Permanent
  1637.   Work        Temp workspace    Banks 1 - 15       Temporary
  1638.   Data        Perm workspace    Banks 1 - 15       Permanent
  1639.  
  1640. Reserve AS type,bank,length     [See MEMORY BANKS for more.]
  1641.  
  1642. Listbank   List banks in use    [See MEMORY BANKS for more.]
  1643.  
  1644. Erase b    Erase data in bank b   [See MEMORY BANKS for more.]
  1645.  
  1646. s=Start(b)   s will hold the starting address of bank b
  1647.  
  1648.                 [See MEMORY BANKS for more.]
  1649.  
  1650. l=Length(b)  l will hold the length of bank b.  If bank b contains
  1651. sprites or BOBs then the number of images will be returned.
  1652.  
  1653.                 [See MEMORY BANKS for more.]
  1654.  
  1655. Load "filename"[,n]
  1656.  
  1657. If filename contains more then one bank then ALL existing banks will
  1658. be erased.  If n is given then only bank n will be overwritten.  If
  1659. filename is sprite or bob data then if n=0 current sprite data will be
  1660. lost; if n=1 then new sprite data will be appended to current data.
  1661.  
  1662.                 [See MEMORY BANKS for more.]
  1663.  
  1664. Save "filename"[,n]
  1665.  
  1666. Save all banks unless n is specified.  Use extension ".ABK"
  1667.  
  1668.                 [See MEMORY BANKS for more.]
  1669.  
  1670. Bsave file$, start To end
  1671.  
  1672. eg. Bsave "Test",START(7) To START(7)+LENGTH(7)
  1673.  
  1674. Saves a chunk of memory.  START(7) to START(7)+LENGTH(7).
  1675.  
  1676. Bload file$, address
  1677.   or
  1678. Bload file$, bank
  1679.  
  1680. If BLOADing into a bank it must already exist.
  1681.  
  1682.                 [See MEMORY BANKS for more.]
  1683.  
  1684. Screen Open n,w,h,nc,mode
  1685.  
  1686. Open screen number n (0-7) , with a size of w pixels wide by h pixels
  1687. high.  The size of the screen can be larger then the display.  nc sets
  1688. the number of colours to be used (2,4,8,16,32,64,4096). mode sets
  1689. Lowres or Hires.  If screen number n already exists it will be
  1690. replaced by new screen. (eg. Screen Open 3,640,200,16,Hires)
  1691.  
  1692. Screen Close n
  1693.  
  1694. Delete screen number n
  1695.  
  1696. Auto View On   Auto View Off
  1697.  
  1698. When AUTO VIEW is on then any new SCREEN that is opened or any changes
  1699. to the current screen will be automatically displayed.  Auto View Off
  1700. prevents this.
  1701.  
  1702. Default
  1703.  
  1704. Closes all currently open screens and returns to the default display.
  1705.  
  1706. View
  1707.  
  1708. Display any changes to the current screen at the next vertical blank
  1709. period.  For use when AUTO VIEW is OFF.
  1710.  
  1711. Load Iff "filename"[,s]
  1712.  
  1713. Load Iff picture called filename into screen number s.  If s is not
  1714. specified then picture will be loaded into the current screen.
  1715.  
  1716. Save Iff "filename"[,compression]
  1717.  
  1718. Save current screen to disk and call it filename. If compression is
  1719. set to 1 then standard Amiga file compression is used.  If compression
  1720. is set to 0 then extra AMOS data containing screen settings such as
  1721. Screen Display, Screen Offset and Screen Hide/Show will be added to
  1722. your file.  The default is 0.
  1723.  
  1724. Screen Display n [,x,y,w,h]
  1725.  
  1726. Display screen number n.  The following modifiers can be added:
  1727. x,y sets the screens location in hardware coordinates.  x is rounded
  1728. to the nearest 16-pixel boundary.
  1729. w,h sets the width and height of current screen in pixels.  w is
  1730. rounded to the nearest 16-pixel boundary.
  1731.  
  1732. Screen Offset n,x,y
  1733.  
  1734. Sets display offset of screen n by x,y pixels.  x and y may be
  1735. negative.
  1736.  
  1737. Screen Clone n
  1738.  
  1739. Clones the current screen to screen n.  This cloned screen can only be
  1740. manipulated by the SCREEN DISPLAY and SCREEN OFFSET commands.
  1741.  
  1742. Dual Playfield screen1, screen2
  1743.  
  1744. Let screen 2 show through colour 0 of screen 1.  The two screens must
  1745. be the same resolution.  The palette for both screens will be taken
  1746. from screen 1.  The colours for screen 2 will be taken from the half
  1747. of the colour registers that are not being used by screen 1.  If
  1748. screen 1 and screen 2 both had 8 colours then screen 1 would use
  1749. colour registers 0-7 and screen two would use colour registers 8-15.
  1750. Anything drawn to screen 2 will automatically have it's colour
  1751. register converted to the appropriate number (eg. if you draw to
  1752. screen 2 with INK set to register 2, then register 9 will actually be
  1753. used.)  The possible screen colour combinations are:
  1754.  
  1755.    Screen 1         Screen 2
  1756.  No of colours    No of colours
  1757.       2                 2
  1758.       4                 2
  1759.       4                 4
  1760.       8                 4        Lowres only
  1761.       8                 8        Lowres only
  1762. Note: never set SCREEN OFFSET for both screens to 0.
  1763.  
  1764. Dual Priority screen1,screen2
  1765.  
  1766. Let screen 2 be in front of screen 1. The colour palette will still be
  1767. taken from screen 1.
  1768.  
  1769. s=Screen
  1770.  
  1771. Return current screen number.  Current screen may or may not be
  1772. visible.
  1773.  
  1774. Screen To Front [s]
  1775.  
  1776. Move screen s to front of display.  If s is omitted then the current
  1777. screen is move to front.
  1778. Note: if AUTO VIEW is OFF then the VIEW command must be used before
  1779. the effect can been seen.
  1780.  
  1781. Screen To Back [n]
  1782.  
  1783. Move screen n back of display.  Default is current screen.
  1784.  
  1785. Screen Hide [n]
  1786.  
  1787. Hide screen n completely from view.  Default is current screen.
  1788.  
  1789. Screen Show n
  1790.  
  1791. Show a screen that was previously hidden with Screen HIDE.
  1792.  
  1793. h=Screen Height [n]
  1794.  
  1795. Returns height of screen n.  Default is current screen.
  1796.  
  1797. w=Screen Width [n]
  1798.  
  1799. Returns width of screen n.  Default is current screen.
  1800.  
  1801. c=Screen Colour
  1802.  
  1803. Returns maximum number of colours in current screen.
  1804.  
  1805. s=Scin(x,y)
  1806.  
  1807. Returns screen number at hardware coordinates x,y.
  1808.  
  1809. Default Palette c1,c2,c3,... c32
  1810.  
  1811. Set colours in a default palette that will be applied to any
  1812. subsequent screens created.  c is the $RGB values for each colour
  1813. register.
  1814.  
  1815. Get Palette n [,mask]
  1816.  
  1817. Load the colour palette from screen n to the current screen.  mask is
  1818. a 32-bit binary number that selects which colours you want to copy to
  1819. the current screen.  When a bit is set to 1 then the corresponding
  1820. colour is copied.
  1821. (eg. to get just the first 4 colours  mask=%000001111 )
  1822.  
  1823. Cls
  1824. Fill current screen with colour 0 and clear any windows that are open.
  1825.  
  1826. Cls col
  1827. Fill current screen with colour col.
  1828.  
  1829. CLS col,x1,y1 To x2,y2
  1830. Fill area x1,y1 To x2,y2 with colour col.
  1831.  
  1832. Screen Copy scr1 To scr2
  1833. Screen Copy screen scr1 To screen scr2
  1834.  
  1835. Screen Copy scr1,x1,y1,x2,y2 To scr2,x3,y3 [,mode]
  1836.  
  1837. Copy an area of screen scr1 to location x3,y3 on screen scr2. Mode is
  1838. a binary number that can set as follows:
  1839.  
  1840.   Mode     Effect                                    Bit pattern
  1841.   REPLACE  Copy image completely over destination     %11000000
  1842.   INVERT   Invert image and copy over destination     %00110000
  1843.   AND      Use logical AND                            %10000000
  1844.   OR       Use logical OR                             %11100000
  1845.   XOR      Use logical XOR                            %01100000
  1846.  
  1847. table=Screen Base
  1848.  
  1849. Returns the base address of the internal table used to hold the number
  1850. and position of your AMOS screen.  See EXAMPLE 20.2 for a simple
  1851. demonstration.  [On your AMOS 1.2 Program disk within the Manual Folder.]
  1852.  
  1853. Def Scroll n,x1,y1 To x2,y2,dx,dy
  1854.  
  1855. Define scroll zone number n (1-16).  x1,y1 to x2,y2 defines the area
  1856. to be scrolled. dx is the number of pixels the zone will be scrolled
  1857. to the right if positive or to the left if negative.  dy is the number
  1858. of pixel the zone will be scrolled down if positive or up if negative.
  1859. The scroll is performed every time the SCROLL command is called.
  1860.  
  1861. Scroll n
  1862.  
  1863. Scroll zone number n as defined in the DEF SCROLL command.
  1864.  
  1865. Screen Swap [n]
  1866.  
  1867. Swap the physical and logical screens.
  1868.  
  1869. This command deals with logical and physical screens.    A physical
  1870. screen is the one that is being shown at any given time and a
  1871. logical is the screen that all current drawing commands are being
  1872. sent to and is not visible.  After all drawing to the logical screen
  1873. is done, it can then be swapped with the physical screen and the
  1874. process repeats.
  1875.  
  1876. address=Logbase(p)
  1877.  
  1878. Returns the address for bit-plane p of the logical screen.
  1879.  
  1880. This command deals with a logical screen ONLY.    A physical
  1881. screen is the one that is being shown at any given time and a
  1882. logical is the screen that all current drawing commands are being
  1883. sent to and is not visible.  After all drawing to the logical screen
  1884. is done, it can then be swapped with the physical screen and the
  1885. process repeats.
  1886.  
  1887. address=Phybase(p)
  1888.  
  1889. Returns the address for bit-plane p of the physical screen.
  1890.  
  1891. This command deals with a physical screen ONLY.    A physical
  1892. screen is the one that is being shown at any given time and a
  1893. logical is the screen that all current drawing commands are being
  1894. sent to and is not visible.  After all drawing to the logical screen
  1895. is done, it can then be swapped with the physical screen and the
  1896. process repeats.
  1897.  
  1898. x=Physic   x=Physic(s)
  1899.  
  1900. Returns an identification number for the current physical screen to be
  1901. used in place of a screen number in the ZOOM, APPEAR and SCREEN COPY
  1902. commands.
  1903.  
  1904. This command deals with a physical screen ONLY.    A physical
  1905. screen is the one that is being shown at any given time and a
  1906. logical is the screen that all current drawing commands are being
  1907. sent to and is not visible.  After all drawing to the logical screen
  1908. is done, it can then be swapped with the physical screen and the
  1909. process repeats.
  1910.  
  1911. x=Logic   x=Logic(s)
  1912.  
  1913. Returns an identification number for the current logical screen.
  1914.  
  1915. This command deals with a logical screen ONLY.    A physical
  1916. screen is the one that is being shown at any given time and a
  1917. logical is the screen that all current drawing commands are being
  1918. sent to and is not visible.  After all drawing to the logical screen
  1919. is done, it can then be swapped with the physical screen and the
  1920. process repeats.
  1921.  
  1922. Wait Vbl
  1923.  
  1924. Wait for the next vertical blank and then continue.  Also see
  1925. MULTI WAIT.
  1926.  
  1927. Appear source To destination,effect [,pixels]
  1928.  
  1929. Make SCREEN source appear on screen destination.  effect (1-number of
  1930. pixels on screen) determines the type of fade.  pixel sets the number
  1931. of pixels starting from the top of the screen that will be affected.
  1932.  
  1933. Fade speed [,colour list]
  1934. Fade the current palette to back or to [colour list].  Speed is the
  1935. number of vertical blank periods used to complete the fade.
  1936.  
  1937. Fade speed To s [,mask]
  1938. Fade the current palette to the palette of screen s.  If s is negative
  1939. then it represents the palette of a sprite.  mask is a bit pattern
  1940. that specifies which colours should be changed.
  1941. (eg. just fade the first 5 colours  FADE 20 To 2,%00011111 )
  1942.  
  1943. Flash index,"($RGB,delay)($RGB,delay)($RGB,delay)..."
  1944. Make colour register index cycle through each $RGB colour value
  1945. listed.  delay is the time measured in 50ths of a second that each
  1946. colour will be displayed.  FLASH operates as an interrupt.
  1947. Note:  A WAIT command should be used after a FLASH command.  It is
  1948. calculated like so:  wait value = fade speed * 15.
  1949.  
  1950. Flash Off
  1951. Deactivate the FLASH command.
  1952.  
  1953. Shift Up delay,first,last,flag
  1954.  
  1955. Shift colours from register first to register last up one position at
  1956. a time.  delay is the time measured in 50ths of a second between each
  1957. shift.  If flag is 1 then the colours loop.  If flag is 0 then the
  1958. contents of the first and last registers will be discarded, and the
  1959. region between will gradually be replaced by a copy of the first
  1960. colour in the list.  SHIFT operates as an interrupt.
  1961.  
  1962. Shift Down delay,first,last,flag
  1963.  
  1964. Shift colours down.  See SHIFT UP.
  1965.  
  1966. Shift Off
  1967.  
  1968. Deactivate the SHIFT UP and SHIFT DOWN command.
  1969.  
  1970. Zoom source,x1,y1,x2,y2 To dest,x3,y3,x4,y4
  1971.  
  1972. Take area defined by x1,y1 to x2,y2 in screen source and make it fit
  1973. into area x3,y3 to x4,y4 on screen dest.
  1974.  
  1975. addr=Cop Logic
  1976.  
  1977. Returns the absolute address to the logical copper list in memory.  This
  1978. allows you to poke your copper instructions directly into the buffer,
  1979. possibly using assembly language.
  1980.  
  1981. (Write a MOVE instruction into the logical copper list.)
  1982.  
  1983. Cop Move addr,value
  1984. Generates a MOVE instruction into the copper list.
  1985.  
  1986. addr is an address of a 16 bit register to be changed.  This must lie
  1987. within the normal copper DATAZONE ($7F-$1BE).
  1988.  
  1989. value is a word-sized (2bytes) integer to be loaded into the requested
  1990. register.
  1991.  
  1992. (See COP LOGIC for the addr value.)
  1993.  
  1994. (Write a long MOVE instruction into the copper list.)
  1995.  
  1996. Cop Movel addr,value
  1997.  
  1998. This is identical to the standard COP MOVE command, except that addr
  1999. now refers to a 32bit copper register.
  2000.  
  2001. value contains a long word (4bytes) integer.
  2002.  
  2003. (Reset copper list pointer.)
  2004.  
  2005. Cop Reset
  2006.  
  2007. COP RESET restores the address used by the next copper instruction to
  2008. the start of the copper list.
  2009.  
  2010. (Copper WAIT instruction)
  2011.  
  2012. Cop Wait x,y[,x mask,y mask]
  2013.  
  2014. COP WAIT writes a WAIT instruction into your copper list.  The copper
  2015. waits until the hardware coordinates x,y have been reached and returns
  2016. control to the main processor.
  2017.  
  2018. Note that line 255 is managed automatically by AMOS.  So, you don't have
  2019. to worry about it at all.
  2020.  
  2021. x mask and y mask are bitmaps which allow you to wait until just a
  2022. certain combination of bits in the screen coordinates have been set.  As
  2023. a default, both masks are automatically assigned to $1FF.
  2024.  
  2025. This freezes the current AMOS copper list and turns off the screen
  2026. display completely.  You can now create your own display using a series
  2027. of COP MOVE and COP WAIT instructions.
  2028.  
  2029. As a default, all user-defined copper lists are limited to a maximum of
  2030. 12k.  On average, each copper instruction takes up 2 bytes.  So, there
  2031. is space for around 6000 instructions.  This may be increased if
  2032. required, using a special option from the AMOS CONFIG utility.
  2033.  
  2034. Note that all copper instructions are written to a separate logical list
  2035. which is not displayed on the screen.  This stops your program from
  2036. corrupting the display while the copper list is being constructed.  To
  2037. activate your new screen, you'll need to swap the physical and logical
  2038. lists around with the COP SWAP command.
  2039.  
  2040. It's also important to generate your copper lists in strict order,
  2041. starting from the top left of the screen, progressing downward to the
  2042. bottom right.  See EXAMPLE 10.15 in the MANUAL folder of your AMOS1.2
  2043. PROGRAM disk.
  2044.  
  2045. This will cause the logical and physical copper lists to swap
  2046. immediately.  [This command is not in the manual!]
  2047.  
  2048. COPPER ON restarts the AMOS copper list calculations and displays the
  2049. current AMOS screens.  Providing you haven't drawn anything since the
  2050. COPPER OFF instruction, the screen will be restored to precisely it's
  2051. original state.
  2052.  
  2053. Spack s To n [x1,y1,x2,y2]
  2054.  
  2055. Compress screen number s into bank number n.  x1,y1,x2,y2 defines the
  2056. area to be saved.  The default is the whole screen.  SPACK also saves
  2057. the screen's mode, size, offset and display position.  All x
  2058. coordinates are rounded to the nearest 8 pixel boundary.
  2059.  
  2060. Pack s To n [x1,y1,x2,y2]
  2061.  
  2062. Same as SPACK but does not save the screen's mode, size, offset or
  2063. position.
  2064.  
  2065. Unpack b to s
  2066. For use with unpacking SPACKed screens.  Unpacks the image in bank b
  2067. to screen number s.
  2068.  
  2069. Unpack b [,x,y]
  2070. For use with unpacking PACKed screens.  Unpacks the image in bank b to
  2071. the current screen at coordinates x,y.  PACKed screen are really
  2072. intended to be used with DOUBLE BUFFERing on.
  2073.  
  2074. Pen index
  2075. Sets colour of text to the colour stored in register index (0-63).
  2076.  
  2077. =PEN$(n)
  2078. a$=Pen(n)
  2079. Allows a colour change within a string.
  2080. (eg.  c$ = Pen$(2) + "White " + Pen$(6) + "Blue" )
  2081.  
  2082. Paper index
  2083. Sets background colour of text to the colour in register index (0-63).
  2084.  
  2085. =PAPER$(n)
  2086. x$=Paper$(n)
  2087. Allows a colour change within a string.
  2088.  
  2089. Inverse On   Inverse Off
  2090.  
  2091. Swaps text background and foreground colours.
  2092.  
  2093. Shade On   Shade Off
  2094.  
  2095. Reduces brightness of text.
  2096.  
  2097. Under On   Under Off
  2098.  
  2099. Turns on-off text underlining.
  2100.  
  2101. Writing w1 [,w2]
  2102.  
  2103. Changes text writing mode as follows:
  2104.  
  2105.   w1=0  REPLACE    New text overwrites anything underneath
  2106.   w1=1  OR         Merge text using logical OR
  2107.   w1=2  XOR        Merge text using logical XOR
  2108.   w1=3  AND        Merge text using logical AND
  2109.   w1=4  IGNORE     All printing will be ignored
  2110.  
  2111.   w2=0  NORMAL     Text is printed along with its background
  2112.   w2=1  PAPER      Only the text background is printed
  2113.   w2=3  PEN        Prints text with a background of colour 0
  2114.  
  2115. Locate x,y   Locate x,   Locate ,y
  2116.  
  2117. Place text cursor at location x,y measured from top left of screen.
  2118.  
  2119. Cmove w,h
  2120.  
  2121. MOVE text cursor relative to current position.
  2122.  
  2123. x$=At(x,y)
  2124.  
  2125. Allows you to place text from within a string.
  2126. (eg.  x$=At(10,10) : PRINT x$ + "Over Here" )
  2127.  
  2128. t=X Text(x)
  2129. Converts a normal x coordinate into a text coordinate relative to the
  2130. current window.  If x lies outside this window a negative value will
  2131. be returned.
  2132.  
  2133. t=Y Text(y)
  2134. Converts a y coordinate form the standard screen format into a text
  2135. coordinate relative to the current window.
  2136.  
  2137. g=X Graphic(x)
  2138. g=Y Graphic(y)
  2139.  
  2140. Converts a relative window coordinate into a screen coordinate.
  2141.  
  2142. Home
  2143.  
  2144. Move text cursor to 0,0
  2145.  
  2146. Cdown
  2147.  
  2148. Moves cursor down one line.
  2149.  
  2150. x$=Cdown$
  2151.  
  2152. Allows a cursor down movement within a string.
  2153.  
  2154. Cup
  2155.  
  2156. Move text cursor up one line.
  2157.  
  2158. x$=Cup$
  2159.  
  2160. Allows a cursor up movement within a string.
  2161.  
  2162. Cleft
  2163.  
  2164. Move text cursor left one space.
  2165.  
  2166. x$=Cleft$
  2167.  
  2168. Allows a cursor left movement within a string.
  2169.  
  2170. Cright
  2171.  
  2172. Move text cursor right one space.
  2173.  
  2174. x$=Cright$
  2175.  
  2176. Allows a cursor right movement within a string.
  2177.  
  2178. x=X Curs
  2179. y=X Curs
  2180.  
  2181. Returns x or y [respective] coordinate of text cursor.
  2182.  
  2183. Set Curs L1,L2,L3,L4,L5,L6,L7,L8
  2184.  
  2185. Changes shape of cursor.  Each parameter is an eight-bit binary number
  2186. representing a line of the cursor starting from the top.
  2187.  
  2188. Curs On   Curs Off
  2189.  
  2190. Turn the current screen's cursor ON or OFF.
  2191.  
  2192. Memorize X   Memorize Y
  2193.  
  2194. Saves current cursor position in memory.
  2195.  
  2196.                 [Also see REMEMBER.]
  2197.  
  2198. Remember X   Remember Y
  2199.  
  2200. Recalls previous MEMORIZEd cursor position.
  2201.  
  2202. Cline [n]
  2203.  
  2204. Clear current line of text.  If n is stated then text is erased from
  2205. current position to n number of characters.
  2206.  
  2207. Curs Pen n
  2208.  
  2209. Change cursor colour.
  2210.  
  2211. Centre a$
  2212.  
  2213. Prints a$ centered on current line.
  2214.  
  2215. Set Tab n
  2216.  
  2217. Sets tab distance to n spaces.
  2218.  
  2219. x$=Tab$
  2220.  
  2221. Returns tab control character.
  2222.  
  2223. x$=Repeat$(a$,n)
  2224.  
  2225. Creates a repeat ESC string for a$ n times and stores result in x$.
  2226.  
  2227. k$=Inkey$
  2228.  
  2229. Returns whichever ASCII key is pressed on the keyboard.  INKEY$ does
  2230. not wait for a key to be pressed.
  2231.  
  2232. s=Scancode
  2233.  
  2234. Returns the scancode for the key that was entered using the last
  2235. INKEY$ function.
  2236.  
  2237. t=Key State(s)
  2238.  
  2239. Returns a value of -1(TRUE) if key number s has been pressed.  s is a
  2240. keyboard SCANCODE.
  2241.  
  2242. k=Key Shift
  2243.  
  2244. Returns a bit pattern representing which control keys have been
  2245. pressed.
  2246.    Bit   Key
  2247.     0    Left Shift
  2248.     1    Right Shift
  2249.     2    Caps Lock (on of off)
  2250.     3    Ctrl
  2251.     4    Left Alt
  2252.     5    Right Alt
  2253.     6    Left Amiga
  2254.     7    Right Amiga (or Commodore key)
  2255.  
  2256. Set Input c1,c2
  2257.  
  2258. This sets the End-Of-Line characters which will be used to terminate all
  2259. input statements.  Normally c1 holds 10 and c2 holds -1.
  2260.  
  2261. c1 and c2 hold ascii values which will be used as input terminators.  If
  2262. you want to use a single character, set c2 to -1.
  2263.  
  2264. x$=Input$(n)
  2265.  
  2266. Returns n number of characters from the keyboard.  This command does
  2267. not echo these characters to the screen.
  2268.  
  2269. Wait Key
  2270.  
  2271. Wait for a key to be pressed and then continue.
  2272.  
  2273. Key Speed lag,speed
  2274.  
  2275. Set the speed of the key repeats.  Both lag and speed are measured in
  2276. 50ths of a second.  lag is the amount of time between the key press
  2277. and the first repeat.  speed is the amount of time between each
  2278. successive repeat.
  2279.  
  2280. Clear Key
  2281.  
  2282. Clears the keyboard buffer.
  2283.  
  2284. Put Key a$
  2285.  
  2286. Load a string into the keyboard buffer.  Often used for setting
  2287. defaults for INPUTs.
  2288.  
  2289. Input [a$];[var1,var2,...];
  2290.  
  2291. a$ is the optional text to be displayed as a prompt.
  2292.  
  2293. Line Input [a$];[var1,var2,...];
  2294.  
  2295. Inputs a number of variables separated by the user by pressing return.
  2296.  
  2297. a$ is the optional text to be displayed as a prompt.
  2298.  
  2299. Print variable list
  2300.  
  2301. Print displays the variable list to the current window or screen.
  2302.  
  2303. NOTE: all variables must separate themselves with semi colons [;].
  2304.       Example:  Print "Your name is";realname$
  2305.  
  2306. Print Using format$;variable list
  2307.  
  2308. Here is a list of the possible formatting controls:
  2309.  
  2310.  ~  Print a single character from a string.
  2311.  #  Print a single digit from a variable.  If no digit then space.
  2312.  +  Add a plus sign if positive or a minus sign if negative.
  2313.  -  Add a minus sign if negative.
  2314.  .  Place decimal point.
  2315.  ;  Centre a number but don't print a decimal point.
  2316.  ^  Print a number in exponential form.
  2317.  
  2318. x$=Zone$(a$,n)
  2319.  
  2320. Creates zone number n around a$ and stores in x$.  When x$ is printed
  2321. it will automatically activate it's zone.
  2322.  
  2323. x$=Border(a$,n)
  2324.  
  2325. Creates border number n around a$ and stores in x$.  When x$ is
  2326. printed it will automatically have a boarder.
  2327.  
  2328. Hscroll n
  2329.  
  2330. Scroll text in current window horizontally by one character. n can be
  2331. one of four values:
  2332.  
  2333.    1 = Move current line to the left
  2334.    2 = Scroll screen to the left
  2335.    3 = Move current line to the right
  2336.    4 = Scroll screen to the right
  2337.  
  2338. Blank lines are left where gaps are created.
  2339.  
  2340. Vscroll n
  2341.  
  2342. Same as HSCROLL except this scroll is vertical and the options are
  2343. different.  n can be one of the following:
  2344.  
  2345.    1 = Any text at the cursor line and below are scrolled down.
  2346.    2 = Text at the cursor line and below (if any) are scrolled up.
  2347.    3 = Only text from the top of the screen to the cursor line is scrolled
  2348.        up.
  2349.    4 = Text from top of the screen to the current cursor position is
  2350.        scrolled down.
  2351.  
  2352. Blank lines are left where gaps are created.
  2353.  
  2354. Text x,y,t$
  2355.  
  2356. Prints graphic text in t$ at x,y.  All coordinates are measured
  2357. relative to the characters baseline which can be determined by the
  2358. TEXT BASE command.
  2359.  
  2360. Get Fonts
  2361.  
  2362. Makes an internal list of available fonts from the current start-up
  2363. disk.  This list can be examined using the FONT$ function.  Get FONTS
  2364. must be called before SET FONT.
  2365.  
  2366. Get Disk Fonts
  2367.  
  2368. Search for fonts in the font folder.
  2369.  
  2370. Get Rom Fonts
  2371.  
  2372. Searches for ROM fonts.
  2373.  
  2374. a$=Font$(n)
  2375.  
  2376. Returns a string of 38 characters describing font number n.  If font
  2377. does not exist then a null string will be returned, otherwise the
  2378. string will be in the following format:
  2379.  
  2380.   Character   Description
  2381.  
  2382.    1-29        Font name
  2383.    30-33       Font height
  2384.    34-37       Identifier (disk or ROM)
  2385.  
  2386. Set Font n
  2387.  
  2388. Change current font to font number n
  2389.  
  2390. Set Text style
  2391.  
  2392. Selects font style. style is a bit pattern:
  2393.    Bit  Effect
  2394.  
  2395.     0   Underline
  2396.     1   Bold
  2397.     2   Italic
  2398.  
  2399. s=Text Styles
  2400.  
  2401. Returns current text style in bit pattern style as in SET TEXT.
  2402.  
  2403. w=Text Length(t$)
  2404.  
  2405. Returns the width of t$ in pixels using the current font.
  2406.  
  2407. b=Text Base
  2408.  
  2409. Returns the position of the current font's base line in pixels.
  2410.  
  2411. Wind Open n,x,y,w,h [,border [,set]]
  2412.  
  2413. Open window number n at graphic coordinates x,y.  x is rounded to the
  2414. nearest multiple of 16.    w,h specify the size of the window in
  2415. characters.  w and h must be divisible by 2.  border selects one of 16
  2416. border styles.  Any borders added to a window will be outside the
  2417. defined text area.  set selects the character set number defined by
  2418. the SET FONT command.
  2419.  
  2420. Wind Save
  2421.  
  2422. This feature saves the display under the window created and is
  2423. replaced when the window is moved or closed.
  2424.  
  2425. Border n,paper,pen
  2426.  
  2427. Set the border of the current window. n is the border style (1-16).
  2428. paper and pen select the foreground and background colours of the
  2429. border.
  2430.  
  2431. Title Top t$
  2432.  
  2433. Display t$ in the top border of current window.  Only bordered windows
  2434. can be titled this way.
  2435.  
  2436. Title Bottom b$
  2437.  
  2438. Display b$ in the bottom border of current window.  Only bordered windows
  2439. can be titled this way.
  2440.  
  2441. Window n
  2442.  
  2443. Activates window number n.
  2444.  
  2445. w=Windon
  2446.  
  2447. Returns current window number.
  2448.  
  2449. Wind Close
  2450.  
  2451. Close current window.
  2452.  
  2453. Wind Move x,y
  2454.  
  2455. Move current window to graphic coordinates x,y.  x will be rounded to
  2456. the nearest 16-pixel boundary.
  2457.  
  2458. Wind Size sx,sy
  2459.  
  2460. Changes window size to sx,sy measured in characters.  After a window's
  2461. size has been changed the text cursor returns to 0,0.
  2462.  
  2463. Clw
  2464.  
  2465. Clear current window and fill with present PAPER colour.
  2466.  
  2467. Hslider x1,y1 To x2,y2,total,pos,size
  2468.  
  2469. Draw a horizontal slider in area x1,y1 To x2,y2.  total is the number
  2470. of units the slider will be divided into.  pos sets the position of
  2471. the slider from the start of the slider in units defined by total.
  2472. size sets the size of the slider box in units defined by total.
  2473.  
  2474. Vslider x1,y1 To x2,y2,total,pos,size
  2475.  
  2476. Similar to HSLIDER.
  2477.  
  2478. Set Slider b1,b2,b3,pb,s1,s2,s3,ps
  2479.  
  2480. Set colours and patterns for slider boxes.  b1,b2,b3 set the ink,paper
  2481. and outline colours for the background of the box.  pb chooses the
  2482. fill pattern to be used for these regions.  s1,s2,s3 set the colours
  2483. for the slider box and ps selects the pattern it is to be filled with.
  2484. bp and ps can be any fill patterns you wish (0-24).
  2485.  
  2486. Ink col[,paper][,border]
  2487.  
  2488. Selects colours for all subsequent drawing operations.  col is the
  2489. register number (0-63), paper is the colour for the background fill
  2490. patterns generated by the SET PATTERN command, border is the colour
  2491. for outlines added to bars and polygons.  The border is toggled by the
  2492. SET PAINT command.  Include commas for excluded parameters.
  2493. (eg. INK ,,10)
  2494.  
  2495. Colour index,$RGB
  2496.  
  2497. Loads colour register index (0-31) with $RGB.  $RGB represents the
  2498. red, green and blue intensity of the colour stored in register index.
  2499.  
  2500. c=Colour(index)
  2501.  
  2502. Return colour stored in register index.
  2503.  
  2504. Palette reg0,reg1,reg2,... reg31
  2505.  
  2506. Load all colour registers with new colours.  Any register not to be
  2507. changed can be skipped by leaving in the corresponding comma.
  2508.  
  2509. Gr Locate x,y
  2510.  
  2511. Set position of the graphics cursor in screen coordinates.  Any
  2512. drawing commands with the starting coordinates omitted will default to
  2513. the current graphic cursor position.
  2514.  
  2515. x=Xgr  y=Ygr
  2516.  
  2517. Returns the current graphics cursor location.
  2518.  
  2519. Plot x,y [,c]
  2520.  
  2521. Draws one pixel at coordinates x,y using colour c.  If c is included
  2522. in this statement then all following drawing commands will use this
  2523. colour; otherwise the pixel will be drawn with the current colour.
  2524.  
  2525. c=Point(x,y)
  2526.  
  2527. Returns the colour register at point x,y
  2528.  
  2529. Draw [x1,y1] To x2,y2
  2530.  
  2531. Draws a line from x1,y1 to x2,y2.  x1 and y1 default to the graphics
  2532. cursor.
  2533.  
  2534. Box x1,y1 To x2,y2
  2535.  
  2536. Draws a box from x1,y1 to x2,y2.
  2537.  
  2538. Polyline x1,y1 To x2,y2 To x3,y3 ...
  2539.  
  2540. POLYLINE is simular to DRAW except it draws several lines at once.  It's
  2541. capable of drawing complex hollow polygons with one statement.
  2542.  
  2543. Circle x,y,r
  2544.  
  2545. Draw a circle at point x,y with a radius of r.
  2546.  
  2547. Ellipse x,y,r1,r2
  2548.  
  2549. Draw an ellipse at point x,y  r1 wide and r2 high.
  2550.  
  2551. Set Line mask
  2552.  
  2553. mask is a 16-bit binary number that describes how lines made by the
  2554. DRAW, BOX and POLYLINE commands will look.  (eg. for a dotted line,
  2555. SET LINE %0101010101010101)  This command does not affect CIRCLE or
  2556. ELLIPSE.
  2557.  
  2558. Paint x,y,mode
  2559.  
  2560. Fills an enclosed area starting at point x,y with the current fill
  2561. pattern made with the SET PATTERN command.  If mode is 0, filling will
  2562. stop at the current border colour. mode 1 will stop filling at any
  2563. colour different from the current INK colour.
  2564.  
  2565. Bar x1,y1 To x2,y2
  2566.  
  2567. Draws a filled rectangle.
  2568.  
  2569. Polygon x1,y1 To x2,y2 To x3,y3 ...
  2570.  
  2571. Draw a filled polygon.  The last x and y coordinates should be the
  2572. same as the first.
  2573.  
  2574.                 [Also see POLYLINE.]
  2575.  
  2576. Set Pattern pattern
  2577.  
  2578. Sets fill pattern.  Default 0 is a solid in the current INK colour.
  2579. If pattern > 0 then one of 34 built-in fill styles is used. The first
  2580. three of which are used for the mouse.  If pattern < 0 the absolute
  2581. value of pattern will relate to the sprite number in bank one. Fill
  2582. sprites will be truncated as follows:  the width will be clipped to 16
  2583. pixels wide, the height will be rounded to the nearest power of 2.
  2584. Two-coloured images will be drawn in the current INK colour.
  2585. Multi-coloured images' foreground colour will be merged with the
  2586. current ink colour using a logical AND; the paper colour of your
  2587. pattern is ORed with the image background colour.  If you want to use
  2588. your images original colour then set your colours to INK 31,0.  Don't
  2589. forget to load your images pallet with the GET SPRITE PALETTE command.
  2590.  
  2591. Set Paint n
  2592.  
  2593. If n = 1 then outline mode is activated.  All POLYGON and BAR
  2594. instructions will be outlined in the boarder colour set with the INK
  2595. command.  If n = 0 then outline mode is turned off.
  2596.  
  2597. Gr Writing bitpattern
  2598.  
  2599. All graphics will be drawn in the style determined by the bitpattern.
  2600. The possibilities are:
  2601.  
  2602. JAM1 Bit 0=0
  2603. Only draws the part of your image that are set to the current ink
  2604. colour.  Any parts drawn in the paper colour are ignored.  This
  2605. is ideal for merging text over an existing background.
  2606.  
  2607. JAM2 Bit 0=1
  2608. This is the default.  Any existing graphics will be replaced by
  2609. the new image (foreground and background).
  2610.  
  2611. XOR Bit 1=1
  2612. Changes the colour of the areas of a drawing which overlap an
  2613. existing picture.  You can erase an image by XORing it in the
  2614. same position.
  2615.  
  2616. INVERSEVID Bit 2=1
  2617. Reverse image before it is drawn.  Swaps foreground and
  2618. background colours of image.
  2619.  
  2620. Note: This command does not affect the PRINT and CENTRE commands
  2621. which are set by the WRITING command.
  2622.  
  2623. It is possible to combine one or more of these styles.
  2624. (eg. GR WRITING %101   use JAM2 and inversevid)
  2625.  
  2626. Clip [x1,y1 To x2,y2]
  2627.  
  2628. Limits all drawing operations to a region of the screen specified by
  2629. by x1,y1 TO x2,y2.  It is acceptable to use coordinates outside of the
  2630. normal screen boundaries.
  2631.  
  2632.  
  2633. Important info:
  2634.  
  2635. Four-colour sprites use the colours stored in registers 16 to 31
  2636. like so:
  2637.           Sprite Number     Colour Registers
  2638.                0/1           17/18/19
  2639.                2/3           21/22/23
  2640.                4/5           25/26/27
  2641.                6/7           29/30/31
  2642.  
  2643. If your are using 32 or 64 colours on a screen then the sprites
  2644. will share the above color registers.  This does not apply to
  2645. fifteen-colour sprites.
  2646.  
  2647. Note: If computed sprites are in use then make sure each sprite uses
  2648. the same colours.
  2649.  
  2650. Sprite n,x,y,i
  2651.  
  2652. Display sprite number n (0-63) at hardware coordinates x,y using image
  2653. number i.  n values that are grater then 7 relate to computed sprites.
  2654.  
  2655. Get Sprite Palette [mask]
  2656.  
  2657. Loads sprite palette into current palette.  mask is a bit-pattern used
  2658. to select certain colours.
  2659.  
  2660. Set Sprite Buffer n
  2661.  
  2662. Eliminate any redundant memory used by the sprite buffer. n (16-256)
  2663. should be set to the number of pixels in your longest sprite.
  2664.  
  2665. Sprite Off [n]
  2666.  
  2667. Turn off all sprites or just sprite number n.
  2668.  
  2669. Sprite Update Off
  2670. Turn off automatic sprite updating.
  2671.  
  2672. Sprite Update
  2673. Update any sprites that have been moved.  For use when Sprite Update
  2674. is OFF.
  2675.  
  2676. Sprite Update On
  2677. Turn automatic sprite updating back on.
  2678.  
  2679. x=X Sprite(n)
  2680. y=Y Sprite(n)
  2681.  
  2682. Returns current x or y [repsective] hardware coordinate of sprite n.
  2683.  
  2684. Get Sprite [s,] i,x1,y1 To x2,y2
  2685.  
  2686. Grab area x1,y1 TO x2,y2 form screen s (default is current screen) and
  2687. store in sprite bank as image i.
  2688.  
  2689. Del Sprite s [TO f]
  2690.  
  2691. Delete SPRITES/BOBs from bank.
  2692.  
  2693. x=X Screen([s,] xcoord)
  2694. y=Y Screen([s,] ycoord)
  2695.  
  2696. Translate a hardware coordinate into a screen coordinate relative to
  2697. the current screen or screen s.
  2698.  
  2699. x=X Hard([s,] xcoord)
  2700. y=Y Hard([s,] Xcoord)
  2701.  
  2702. Translate a screen coordinate into a hardware coordinate.
  2703.  
  2704. image=I Sprite(n)
  2705.  
  2706. Returns the current image number for sprite number n.  0 will be
  2707. returned if the sprite is not displayed.
  2708.  
  2709. table=Sprite Base(n)
  2710.  
  2711. Provides the address of the internal data list for sprite n.  If sprite
  2712. n does not exist, then the address of table will be 0.
  2713.  
  2714. Negative values for n return the address of the optional MASK associated
  2715. with your sprite.  table will now contain one of three possible values
  2716. depending on the status of this mask:
  2717.  
  2718. table<0   Indicates that there is no mask for this sprite.
  2719.  
  2720. table=0   Sprite n does have a mask, but the system has yet to generate
  2721.           it.
  2722.  
  2723. table>1   This is the address of the MASK in memory.  The first Long
  2724.           Word [see LEEK] of this area holds the lenght of the mask
  2725.           and the following locations is the actual mask defination.
  2726.  
  2727. See EXAMPLE 20.3 for a simple demonstration.  [On your AMOS 1.2 Program
  2728. disk within the Manual Folder.]
  2729.  
  2730. Bob n,x,y,i
  2731.  
  2732. Place BOB number n at screen coordinates x,y using image number i.  n
  2733. is normally limited to 63 at the most but this value can be changed
  2734. with the AMOS setup program.
  2735.  
  2736. Double Buffer
  2737.  
  2738. Create a logical screen for the current physical screen.
  2739.  
  2740. Set Bob n,back,planes,minterms
  2741.  
  2742. Set drawing parameters for BOB number n.  If back = 0 then the BOB can
  2743. be moved around without corrupting the background.  If back > 0 then
  2744. then area beneath the BOB will be replaced by colour back-1.  This is
  2745. useful if a BOB is moving on a solid coloured background.  If back < 0
  2746. then the redrawing process is turned off and its up to the user to
  2747. replace and backgrounds destroyed by the BOB.  planes is a binary mask
  2748. representing which bit-planes the BOB will be drawn on.  minterm is
  2749. the blitter mode used to draw the BOB.  Normal settings are %11100010
  2750. if the BOB is used with a mask or %11001010 if no mask has been set.
  2751. Note: it is a good idea to use the SET BOB command before turning a
  2752. BOB on.
  2753.  
  2754. No Mask [n]
  2755.  
  2756. Turn of masks for all BOBs or just BOB number n.
  2757.  
  2758. Autoback n
  2759.  
  2760. Coordinate drawing functions with BOBs.  n sets the AUTOBACK mode.  If
  2761. n = 0 then AUTOBACK is turned off.  All drawing commands are sent to
  2762. the logical screen only.  If n = 1 then graphical operations are sent
  2763. to the physical and logical screens at the same time.  No account is
  2764. taken of the BOB on the screen.  It is best to keep graphical
  2765. operations away from BOB when in this mode.  If n = 2 then graphical
  2766. operations are now synced with the BOB updates and will appear behind
  2767. them.  However, in this mode, graphical operations will take twice as
  2768. long to complete.
  2769.  
  2770. Bob Update On
  2771. Turn on the automatic BOB update function.  BOBs will be drawn every
  2772. 50th of a second.
  2773.  
  2774. Bob Update Off
  2775. Turn off the automatic BOB update function.  This allows all BOBs to
  2776. be placed before they are drawn.  To draw BOBs use Bob Update (below).
  2777.  
  2778. Bob Update
  2779. Draws all BOBs.  Note:  Bob UPDATE draws all BOBs to the logical
  2780. screen.  In order to see them a SCREEN SWAP command must be called.
  2781.  
  2782. Bob Clear
  2783.  
  2784. Clear all BOBs from the screen and redraw the background regions
  2785. underneath.  This is intended for use with BOB DRAW to provide an
  2786. alternative to the standard BOB UPDATE command.
  2787.  
  2788. Bob Draw
  2789.  
  2790. Draw all BOBs.  BOB CLEAR and BOB DRAW give finer control over BOB
  2791. updates then the BOB UPDATE command.
  2792.  
  2793. x1 =X Bob(n)
  2794. y1 =Y Bob(n)
  2795.  
  2796. Returns the x or y [respective] screen coordinate of BOB number n.
  2797.  
  2798. im=I Bob(n)
  2799.  
  2800. Returns the current image number used by BOB number n.  The value will
  2801. be 0 if BOB number n is not displayed.
  2802.  
  2803. Limit Bob [n,] x1,y1 To x2,y2
  2804.  
  2805. Limit the visibility of all BOBs or just BOB number n to an area
  2806. defined by x1,y1 to x2,y2 in screen coordinates.  x will be rounded to
  2807. the nearest 16 pixel boundary.  This area must be greater then the
  2808. width of your BOBs or an error message will be returned.
  2809.  
  2810. Get Bob [s,] i,x1,y1 To x2,y2
  2811.  
  2812. Grab an an image in area x1,y1 to x2,y2 on screen s and store it as
  2813. BOB image number i.
  2814.  
  2815. Put Bob n
  2816.  
  2817. Draw BOB number n to the screen at its current location for good.
  2818. Background image is not preserved.  Note:  Its a good idea to use a
  2819. WAIT VBL after this command.
  2820.  
  2821. Paste Bob x,y,i
  2822.  
  2823. Draw image number i to the current screen at screen coordinates x,y.
  2824. A WAIT VBL command is not needed after this command.
  2825.  
  2826. Bob Off [n]
  2827.  
  2828. Turn off all BOBs or just BOB number n.
  2829.  
  2830. Hide [On]
  2831.  
  2832. Hide the mouse pointer.  A record of the number of times this function
  2833. has been used is kept and it takes an equal number of SHOW commands
  2834. before the mouse is visible again.  HIDE On will hide the pointer
  2835. regardless of how many times the SHOW command has been called.  Even
  2836. though the pointer is invisible, its location can still be read with
  2837. the X MOUSE and Y MOUSE functions.
  2838.  
  2839. Show [On]
  2840.  
  2841. Show the mouse pointer.  A record of the number of times this function
  2842. has been used is kept and it takes an equal number of HIDE commands
  2843. before the pointer will be hidden.  SHOW On will show the pointer
  2844. regardless of how many times the HIDE command has been called.
  2845.  
  2846. Change Mouse m
  2847.  
  2848. Change the pointer image number m.  If m = 1 then pointer is an arrow.
  2849. If m = 2 then pointer is a crosshair.  If m = 3 then pointer is a
  2850. clock.  If m > 3 then pointer will be image number m-3.  The mouse
  2851. image can not be wider then 16 pixels and contain no more then four
  2852. colours.
  2853.  
  2854. k=Mouse Key
  2855.  
  2856. Returns a bit pattern representing which key(s) of the mouse have been
  2857. pressed.  Bits 0-2 represent mouse buttons 1-3.
  2858.  
  2859. c=Mouse Click
  2860.  
  2861. Returns a bit pattern representing which key(s) of the mouse have been
  2862. clicked.  The register is set back to zero after it has been checked
  2863. so it will only detect one key press at a time.
  2864.  
  2865. x1=X Mouse    X Mouse=x1
  2866. Returns current x hardware coordinate of the mouse pointer, or assigns
  2867. pointer to coordinate x1.
  2868.  
  2869. y1=Y Mouse    Y Mouse=y1
  2870. Returns current y hardware coordinate of the mouse pointer, or assigns
  2871. pointer to coordinate y1.
  2872.  
  2873. Limit Mouse x1,y1 To x2,y2
  2874.  
  2875. Restrict mouse movement to area x1,y1 to x2,y2.
  2876.  
  2877. d=Joy(j)
  2878.  
  2879. Returns a bit pattern that represents the direction of joystick j
  2880. (0-1).  The pattern is as follows:
  2881.  
  2882.     Bit Number    Direction
  2883.         0            up
  2884.         1           down
  2885.         2           left
  2886.         3           right
  2887.         4         fire button
  2888.  
  2889. x=Jleft(j)
  2890.  
  2891. Returns a value of -1(TRUE) if joystick number j is moved to the left,
  2892. otherwise 0(FALSE) is returned.
  2893.  
  2894. x=Jright(j)
  2895.  
  2896. Returns a value of -1(TRUE) if joystick number j is moved to the
  2897. right, otherwise 0(FALSE) is returned.
  2898.  
  2899. x=Jup(j)
  2900.  
  2901. Returns a value of -1(TRUE) if joystick number j is moved up,
  2902. otherwise 0(FALSE) is returned.
  2903.  
  2904. x=Jdown(j)
  2905.  
  2906. Returns a value of -1(TRUE) if joystick number j is moved down,
  2907. otherwise 0(FALSE) is returned.
  2908.  
  2909. x=Fire(j)
  2910.  
  2911. Returns a value of -1(TRUE) if fire button on joystick j is down,
  2912. otherwize 0(FALSE) is returned.
  2913.  
  2914. c=Sprite Col(n [,s To e])
  2915.  
  2916. Returns -1(TRUE) if sprite number n has collided with any other
  2917. sprites or just a range of sprites from s to e.
  2918. Note: the MAKE MASK command must be called before this function can be
  2919. used.
  2920.  
  2921. c=Bob Col(n [,s To e])
  2922.  
  2923. Returns -1(TRUE) if BOB number n has collided with any other BOB or
  2924. just a range of BOBs from s to e.
  2925.  
  2926. c=Spritebob Col(n [,s To e])
  2927.  
  2928. Returns -1(TRUE) if sprite number n has collided with any BOBs or just
  2929. a range of BOBs form s to e.
  2930.  
  2931. Note: this function only works in low res.
  2932.  
  2933. c=Bobsprite Col(n [,s To e])
  2934.  
  2935. Returns -1(TRUE) if BOB number n has collided with any sprites or just
  2936. a range of sprites form s to e.
  2937.  
  2938. Note: this function only works in low res.
  2939.  
  2940. c=Col(n)
  2941.  
  2942. COL is an array containing the collision detection data.  Each element
  2943. relates to a sprite or BOB.  The first element will be set to -1 if a
  2944. collision has been detected with sprite or BOB number 1 and so on
  2945. through the array.
  2946.  
  2947. Also see AUTHOR NOTE ON =COL(BOB).
  2948.  
  2949. Hot Spot i,x,y
  2950.  
  2951. Sets the hot spot for image number i to x,y measured in pixel from the
  2952. top left corner of the image.  A hot spot is the "handle" by which a
  2953. image is positioned.
  2954.  
  2955. Make Mask [n]
  2956.  
  2957. Make a mask for all images in the SPRITE/BOB bank or just image n.
  2958. Masks are used for collision detection.
  2959.  
  2960. Reserve Zone [n]
  2961.  
  2962. Reserve memory for n number of ZONEs.  If n is not provided then all
  2963. zones are removed from memory.
  2964.  
  2965. Set Zone z,x1,y1 To x2,y2
  2966.  
  2967. Create zone area number n at screen coordinates x1,y1 to x2,y2.  The
  2968. RESERVE ZONE command must be called before any zones are set.
  2969.  
  2970. t=Zone([s,] x,y)
  2971.  
  2972. Returns the zone number at screen coordinates x,y on screen s.  This
  2973. only detects the first zone at these coordinates.
  2974.  
  2975. t=Hzone([s,] x,y)
  2976.  
  2977. Returns the zone number at hardware coordinates x,y on screen s.
  2978.  
  2979. x=Mouse Zone
  2980.  
  2981. Returns the zone number at the current mouse position.
  2982.  
  2983. Reset Zone [z]
  2984.  
  2985. Deactivate all zones or just zone number z.  This does not fee any
  2986. memory used by the RESERVE ZONE command.
  2987.  
  2988. Priority On   Priority Off
  2989.  
  2990. Normally BOBs are drawn in the order they are numbered.  When Priority
  2991. in ON then the BOBs with the greater y coordinates are given priority.
  2992. This means that the BOB lower on the screen have priority over the
  2993. BOBs higher on the screen.  PRIORITY OFF set BOB priority calculation
  2994. back to normal.
  2995.  
  2996. Update   Update On   Update Off
  2997.  
  2998. Same as SPRITE UPDATE and BOB UPDATE except this command controls both
  2999. SPRITEs and BOBs at the same time.
  3000.  
  3001. Paste Icon x,y,n
  3002.  
  3003. Draw icon number n at graphic coordinates x,y.
  3004. Note: if DOUBLE BUFFER is on then icons will be drawn to both the
  3005. physical and logical screens.  To speed this up, turn AUTOBACK to 0
  3006. before drawing icons.  This way they are only drawn to the logical
  3007. screen.
  3008.  
  3009. Get Icon [s,] i,x1,y1 To x2,y2
  3010.  
  3011. Grab icon number i from area x1,y1 to x2,y2 form screen s.
  3012.  
  3013. Get Icon Palette
  3014.  
  3015. Use icon palette.
  3016.  
  3017. Del Icon n [TO m]
  3018.  
  3019. Delete icon n to m.
  3020.  
  3021. Make Icon Mask [n]
  3022.  
  3023. Make a mask for all icons or just icon number n.
  3024.  
  3025. table=Icon Base(n)
  3026.  
  3027. Returns the address for icon n.  The format for this information is
  3028. exactly the same as the SPRITE BASE command.
  3029.  
  3030. Get Block n,x,y,w,h [,mask]
  3031.  
  3032. Grab block number n from location x,y to width w and height h.  If
  3033. mask is set to 1 then a mask will be made for the block.
  3034.  
  3035. Put Block n [,x,y]
  3036. Draw block number n at its original coordinates or at x,y.  x and y
  3037. are rounded to the nearest 16-pixel boundary.
  3038.  
  3039. Put Block n,x,y,planes [,minterms]
  3040. Draw block number n at x,y.  planes is a bit pattern dictating which
  3041. planes the block is drawn on.  minterms selects the blitter mode.
  3042.  
  3043. Del Block [n]
  3044.  
  3045. Delete all blocks from memory or just block number n.
  3046.  
  3047. Get Cblock n,x,y,w,h
  3048.  
  3049. Grab compressed block number n from location x,y to width w and height
  3050. h.  x will be rounded to the nearest multiple of eight.
  3051.  
  3052. Put Cblock n [,x,y]
  3053.  
  3054. Draw compressed block number n at its original coordinates or at x,y.
  3055. x will be rounded to the nearest multiple of eight.
  3056.  
  3057. Del Cblock [n]
  3058.  
  3059. Delete all compressed blocks or just number n.
  3060.  
  3061. Boom
  3062.  
  3063. Make a boom sound.
  3064.  
  3065. Shoot
  3066.  
  3067. Make a gun shot sound.
  3068.  
  3069. Bell
  3070.  
  3071. Make a bell sound.
  3072.  
  3073. Volume [v,] intensity
  3074.  
  3075. Change volume of all sound channels or just channel number v.
  3076. intensity can be set from 0(off) to 63(full volume).
  3077.  
  3078. Sam Play s    Sam Plap v,s    Sam Play v,s,f
  3079.  
  3080. Play sample number s with voice v at a frequency of f.  v is a bit
  3081. pattern representing the 4 voice channels.
  3082.  
  3083. Sam Bank n
  3084.  
  3085. Select a new memory bank to be used for samples.
  3086.  
  3087. Sam Raw v,addr,len,freq
  3088.  
  3089. Play a raw sound sample from anywhere in memory using voice v.
  3090. Starting at address addr, play len number of samples at a frequency of
  3091. freq.
  3092.  
  3093. Sam Loop On    Sam Loop Off
  3094.  
  3095. All subsequent samples are to be continuously looped.
  3096.  
  3097. Play [voice,] pitch,delay
  3098.  
  3099. Plays the single note pitch for a length of delay.  The optional voice
  3100. is a bit pattern which allows you to select one or more voices.
  3101.  
  3102. For full details, it's recommended that you read page 240-241 in your
  3103. manual for the listing of the notes and voice settings.
  3104.  
  3105. Set Wave wave,shape$
  3106.  
  3107. This provides you with the ability to design your own instruments.  The
  3108. WAVE command then allows you to use the wave with a voice.
  3109.  
  3110. In most musical programs [Sonix, DMCS, etc], you have the ability to use
  3111. a WAVEform, so you now do with AMOS.  As usual, these waveforms are a
  3112. list of values from 0 to 255 and of a length of 256 values.
  3113.  
  3114. For more information, it is suggested to read pages 241-243 of your
  3115. manual to see what a WAVEform is.
  3116.  
  3117. Wave w To v
  3118.  
  3119. This instructs the voice(s) v that it is to use the WAVEform w while
  3120. playing notes with the PLAY command.  v contains the standard bitmap
  3121. format for selecting voices.
  3122.  
  3123. Noise To v
  3124.  
  3125. This instructs the voice(s) v that it is to use the Amos WHITE NOISE
  3126. WAVEform for the selected voice(s) v.  v contains the standard bitmap
  3127. format for selecting voices.
  3128.  
  3129. Del Wave n
  3130.  
  3131. This deletes user created WAVEforms that were created using the SET WAVE
  3132. command.  All voices using deleted WAVEform will be reset to the
  3133. standard SINE WAVEform (default).
  3134.  
  3135. Sample n To v
  3136.  
  3137. This allows a digitized WAVEform to be used as a WAVEform for v.  The
  3138. sample is a standard sample that the SAM PLAY would play.
  3139.  
  3140. For more details, see page 245 of your manual.
  3141.  
  3142. Set Envel wave,phase To duration,volume
  3143.  
  3144. wave is the WAVEform that you wish to change the Envelope of.  This also
  3145. immediately will change any voice playing this WAVEform to the current
  3146. settings.
  3147.  
  3148. It is recommended to read the information in the manual on page 245-246
  3149. for further information on Attack, Decay, Sustain and Release.
  3150.  
  3151. Say t$ [,mode]
  3152.  
  3153. SAY will cause your amiga to speak t$ to you.
  3154.  
  3155. mode can be one of two modes:
  3156.  
  3157. 0  (default) means AMOS must wait for the SAY command to finish speaking.
  3158.  
  3159. 1  allows AMOS to continue while the SAY command speaks, but this slows
  3160.    down AMOS, so use as you see fit.
  3161.  
  3162. Set Talk sex,mode,pitch,rate
  3163.  
  3164. The following is the format for:
  3165.  
  3166. sex   is:      0 for male [default], 1 is for female
  3167.  
  3168. mode  is:      a rythmic effect added to the speech.
  3169.                  0  (default) is off
  3170.                  1  turns on the rythmic effect.
  3171.  
  3172. pitch is:      changes the pitch of the voice from 65 (low) to
  3173.                320 (incredibly high)
  3174.  
  3175. rate  is:      amount of words/minute ranging from 40 to 400.
  3176.  
  3177. Any of the above can be omitted, as long as commas are left as required.
  3178.  
  3179. Example:  Set Talk ,,,65
  3180.  
  3181. Music n
  3182.  
  3183. Play music number n.  Only one piece of music can be played at a time,
  3184. but up to four can be active and waiting on a stack.  All music files
  3185. must first be translated to AMOS format using one of the conversion
  3186. programs.
  3187.  
  3188. Music Stop
  3189.  
  3190. Stop playing the current piece of music.
  3191.  
  3192. Music Off
  3193.  
  3194. Turn off all music.  If restarted, the music will play from the
  3195. beginning.
  3196.  
  3197. Tempo s
  3198.  
  3199. Set tempo for music to s (1-100).
  3200.  
  3201. Mvolume n
  3202.  
  3203. Change the music volume to n (0-63).
  3204.  
  3205. Voice mask
  3206.  
  3207. Set which voices are to be used by the music.  mask is a bit pattern
  3208. representing the four voice channels.
  3209.  
  3210. s=Vumeter(v)
  3211.  
  3212. Returns the volume of the current note being played.  The value
  3213. returned can range form 0 to 63.
  3214.  
  3215. Led On   Led Off
  3216.  
  3217. Turn the audio filter on or off.  This also controls the power light
  3218. on the Amiga.
  3219.  
  3220. Menu$(n)=title$
  3221. Set menu titles that will appear in the menu bar.  Leave a space at
  3222. the end of each title to space them out.
  3223. (eg.  Menu$(1)="First menu " : Menu$(2)="Second menu " )
  3224.  
  3225. Menu$(t,o)
  3226. Menu$(t,o)=normal$ [,selected$][,inactive$][,background$]
  3227. Set option number o under title number t to normal$.
  3228. (eg. Menu$(1,1)="First option" : Menu$(1,2)="Second option" )
  3229. selected$ sets what the option will look like when it is selected.
  3230. The default is inverse text.  inactive$ sets what the option will look
  3231. like when it is inactive.  The default is italic text.  background$
  3232. sets the background for the menu.  background sets any back ground
  3233. that can be drawn with embedded drawing commands explained later.
  3234.  
  3235. Menu On
  3236. Activate menu defined in the Menu$ commands.
  3237.  
  3238. Menu On [bank]
  3239. Activates a menu that has been defined.  If bank number is included
  3240. then the menu in the appropriate memory bank will be used.
  3241.  
  3242. select=Choice
  3243. Returns a value of -1(TRUE) if something has been selected from the
  3244. menu.  CHOICE is set to 0(FALSE) after every check.
  3245.  
  3246. item=Choice(c)
  3247. Returns the option number that was selected at level number c.
  3248.  
  3249. On Menu Proc proc1 [,proc2][,proc3]...
  3250.  
  3251. Executes the procedure in the list that corresponds with menu title
  3252. that has been selected.  (eg. if the 3rd menu item was selected then
  3253. the 3rd procedure in the list will be executed.)  This is an interrupt
  3254. command and is checked every 50th of a second.
  3255.  
  3256. On Menu Gosub label1 [,label2][,label3]...
  3257.  
  3258. Similar to ON MENU PROC.
  3259.  
  3260. On Menu Goto label1 [,label2][,label3]...
  3261.  
  3262. Similar to ON MENU PROC.
  3263.  
  3264. On Menu On
  3265. Activate the automatic menuing system created by the On Menu
  3266. Proc/Gosub/Goto commands.  Every time an On Menu Proc/Gosub/Goto
  3267. function is called, the automatic system is turned off.  It must be
  3268. turned back on with an On Menu On command before the end of a
  3269. procedure or subroutine if you want it to stay on.
  3270.  
  3271. On Menu Off
  3272. On Menu Off turns off the automatic menuing system.  Its a good idea
  3273. to do this before disk access.
  3274.  
  3275. Clear the current automatic menuing system so that another can be
  3276. defined.  A ON MENU OFF command must be used before this one.
  3277.  
  3278. Menu Key(,,) To c$
  3279. Create a keyboard short cut to a menu selection.  c$ is a single
  3280. character.
  3281.  
  3282. Menu Key(,,) To scan [,shift]
  3283. Create a keyboard short cut to non ASCII keys.  scan is a keyboard
  3284. scancode:
  3285.  
  3286.     Scancode     Keys
  3287.      80-89        Function keys F1-F10
  3288.      95           Help
  3289.      69           Esc
  3290. shift is an optional bitmap that checks for control keys:
  3291.  
  3292.   Bit    Key
  3293.    0     Left Shift Key
  3294.    1     Right Shift Key
  3295.    2     Caps Lock (On or Off)
  3296.    3     Ctrl
  3297.    4     Left Alt
  3298.    5     Right Alt
  3299.    6     Left Amiga
  3300.    7     Right Amiga (or Commodore key)
  3301.  
  3302. Menu Off
  3303.  
  3304. Turn off the menu bar.
  3305.  
  3306. Menu Del [(,,)]
  3307.  
  3308. Delete all menus or just those listed.
  3309.  
  3310. Menu To Bank n
  3311.  
  3312. Save current menu tree to bank number n.  Bank number n must not
  3313. already exist.  When a menu tree has been saved to a bank, it will
  3314. automatically be saved and loaded along with the main program.  This
  3315. means that the original program lines defining the menu can be
  3316. deleted, saving memory.
  3317.  
  3318. Bank To Menu n
  3319.  
  3320. Load a menu tree saved in bank n.  To activate the new menu, use the
  3321. MENU ON command.
  3322.  
  3323. Menu Calc
  3324.  
  3325. Rearranging a large menu can take some time.  Wait for an appropriate
  3326. time, then turn off the menu with MENU OFF, rearrange the menu, use
  3327. MENU CALC, and then turn the menu back on with MENU ON.
  3328.  
  3329. Menu Inactive level    Menu Inactive(,,)
  3330.  
  3331. Set an entire level of the menu to inactive or an individual option by
  3332. addressing its position in the menu tree.
  3333.  
  3334. Menu Active level    Menu Active(,,)
  3335.  
  3336. Activate an entire menu level or an individual option by addressing
  3337. its position in the menu tree.
  3338.  
  3339. Menu Line level    Menu Line(,,)
  3340.  
  3341. Display menu as a horizontal line.
  3342.  
  3343. Menu Tline level    Menu Tline(,,)
  3344.  
  3345. Display menu as a horizontal line that goes right across the screen.
  3346.  
  3347. Menu Bar level    Menu Bar(,,)
  3348.  
  3349. Display menu as a vertical bar.
  3350.  
  3351. Menu Movable level    Menu Movable(,,)
  3352.  
  3353. Allow menus to be moved by the user.
  3354.  
  3355. Menu Static level    Menu Static(,,)
  3356.  
  3357. Stop user from rearranging the menus.
  3358.  
  3359. Menu Separate level    Menu Separate(,,)
  3360.  
  3361. Allow each item in a menu to be treated as a separate element.
  3362.  
  3363. Menu Link level    Menu Link(,,)
  3364.  
  3365. Reverse the MENU SEPARATE command.
  3366.  
  3367. Menu Base x,y
  3368.  
  3369. Set the starting point of the first level of menus to x,y.
  3370.  
  3371. Set Menu (,,) To x,y
  3372.  
  3373. Place the top left corner of a menu to x,y measured relative to the
  3374. previous level.
  3375.  
  3376. Menu Mouse On    Menu Mouse Off
  3377.  
  3378. Display menus at the current mouse pointer location.  The position of
  3379. the menus can be offsetted by the menu base command.
  3380.  
  3381. Menu Called(,,)
  3382.  
  3383. This automatically redraws the selected menu item 50 times a second
  3384. whenever it is displayed on the screen.  It's usually used in junction
  3385. with a menu procedure to generate animated menu items which change
  3386. infront of your eyes.
  3387.  
  3388. See EXAMPLE 16.11 in the MANUAL folder of your AMOS1.2 PROGRAM disk.
  3389.  
  3390. Menu Item Movable level
  3391. Menu Item Movable(,,)
  3392.  
  3393. This command is simular to the MENU MOVABLE command except that it
  3394. allows you to re-arrange the various options in a particular level.  So,
  3395. all the items in a menu bar may be individually repositioned by the
  3396. user.  See your manual page 230 for detailed information on this
  3397. command.
  3398.  
  3399. Menu Item Static level
  3400. Menu Item Static(,,)
  3401.  
  3402. This command locks one or more menu items firmly into place and is the
  3403. default setting.
  3404.  
  3405. Menu Once(,,)
  3406.  
  3407. Turns off the automatic updating system started using the command
  3408. MENU CALLED.  From that point on, the menu item selected will only be
  3409. drawn once when on screen.
  3410.  
  3411. x=Menu X(,,)
  3412. This function allows you to retrieve the position of a menu item
  3413. relative to the previous option on the screen.  You can use this
  3414. information to implement powerful menus such as the one found in EXAMPLE
  3415. 16.13 in the MANUAL folder on your AMOS1.2 PROGRAM disk.
  3416.  
  3417. y=Menu Y(,,)
  3418. Returns the Y coordinate of the menu option.  Note that all coordinates
  3419. are measured relative to the previous item.  So this is NOT a standard
  3420. screen coordinate.
  3421.  
  3422. Important Info:
  3423.  
  3424. The following embedded menu commands can be added to your menus
  3425. by including them in round brackets () in the menu definition
  3426. string. (eg. MENU$(1)="(locate 10,10 : INK 1,1) Hello"  )
  3427.  
  3428. BOB
  3429. BOb n
  3430. Display BOB number n at the current cursor location.  The HOT SPOT of
  3431. the BOB is not taken into account.
  3432.  
  3433. ICON
  3434. ICon n
  3435. Draw icon number n at the current cursor location.
  3436.  
  3437. LOCATE
  3438. LOcate x,y
  3439. Place the graphics cursor at x,y measured relative to the top left
  3440. corner of the menu line.  After a graphics operation the new cursor
  3441. location will be at the bottom right corner of the last object drawn.
  3442.  
  3443. INK
  3444. INk n,index
  3445. Change the colour register of the PEN, PAPER or OUTLINE to index.  If
  3446. n= 1 then the PEN is affected, 2 for the PAPER and 3 for the OUTLINE.
  3447.  
  3448. SFONT
  3449. SFont n
  3450. Set current font to graphics font number n.
  3451.  
  3452. SSTYLE
  3453. SStyle n
  3454. Set font style to n.  n is a bit pattern.  Bit 0 sets underline, 1
  3455. sets bold and 2 sets italic.
  3456.  
  3457. LINE
  3458. LIne x,y
  3459. Draw a line from the current cursor position to graphics coordinates
  3460. x,y.
  3461.  
  3462. SLINE
  3463. SLine p
  3464. Set line style to bit pattern in p.  p should be entered as a decimal.
  3465.  
  3466. BAR
  3467. BAr x,y
  3468. Draw a rectangular bar from the current cursor location to x,y.
  3469.  
  3470. PATTERN
  3471. PAttern n
  3472. Set fill pattern to n.
  3473.  
  3474. OUTLINE
  3475. OUtline flag
  3476. If flag is 1 then outline mode is on.  0 turns it off.
  3477.  
  3478. ELLIPSE
  3479. ELlipse r1,r2
  3480. Draw an ellipse with the center at the current cursor position radii
  3481. or r1 and r2.
  3482.  
  3483. Dir [PATH$][/W]
  3484.  
  3485. W will cause the directory to be printed in two columns.
  3486.  
  3487. s$=Dir$   Dir$=s$
  3488.  
  3489. Return or set the current directory.
  3490.  
  3491. Parent
  3492.  
  3493. Jump up one directory.
  3494.  
  3495. Set Dir n [,filter$]
  3496.  
  3497. Set directory listings to n characters wide.  filter$ contains a list
  3498. of path names separated by / to be excluded from the directory list.
  3499. (eg. SET DIR 10,".INFO/*.INFO/*.*.INFO" )
  3500.  
  3501. f=Dfree
  3502.  
  3503. Returns the number of bytes free on the current disk.
  3504.  
  3505. Mkdir f$
  3506.  
  3507. Make a new folder.
  3508.  
  3509. Kill f$
  3510.  
  3511. Erase a file on disk.
  3512.  
  3513. Rename old$ To new$
  3514.  
  3515. f$=Fsel$(path$ [,default$][,title1$,title2$])
  3516.  
  3517. Calls up the file requester and returns the selected file name or ""
  3518. if QUIT was selected.
  3519.  
  3520. Run f$
  3521.  
  3522. Run program f$ from disk.
  3523.  
  3524. flag=Exist(f$)
  3525.  
  3526. Returns a value of -1(TRUE) if file f$ exists on disk.
  3527.  
  3528. file$=Dir First$(path$)
  3529.  
  3530. Returns the first file name at location path$.
  3531.  
  3532. file$=Dir Next$
  3533.  
  3534. Returns the name of the next file in the directory.  DIR FIRST$ must
  3535. be called before this command.  If there is not another file, then ""
  3536. is returned.
  3537.  
  3538. Open Out c,n$
  3539.  
  3540. Open channel number c for output to file n$.  If the file already
  3541. exists then the old one will be erased.
  3542.  
  3543. Append c,n$
  3544.  
  3545. Open channel number c for appending output to file n$.
  3546.  
  3547. Open In c,n$
  3548.  
  3549. Open channel number c for input from file n$.
  3550.  
  3551. Open Port channel,"PAR:"  (Opens channel to the Parallel interface.)
  3552. Open Port channel,"SER:"  (Opens channel to the Serial interface.)
  3553. Open Port channel,"PRT:"  (Opens channel to the Printer interface
  3554.                            chosen from Workbench Preferences.)
  3555.  
  3556. OPEN PORT allows you to communicate with external devices such as
  3557. printers.  All the standard sequential file commands can be preformed as
  3558. normal, except for commands like LOF or POF which are obviously only
  3559. relevant to disc operations.
  3560.  
  3561. n=Port(channel)
  3562.  
  3563. Tests to see if an input device is ready to send you some information. 
  3564. If the device is ready for you to read it, n will have a -1(TRUE)
  3565. value or a 0(FALSE) value otherwize.
  3566.  
  3567. Open Random channel,f$
  3568.  
  3569. Opens a RANDOM ACCESS file called f$.  When you're using this
  3570. instruction, you should always define the record structure immediately
  3571. after using the FIELD command.
  3572.  
  3573. Field channel,length1 As field1$,length2 As field2$,...
  3574.  
  3575. Field allows you to define a record which will be used for a random
  3576. access file.  This record can be up to 65535 bytes in length.
  3577.  
  3578. Get channel,r
  3579.  
  3580. This loads the FIELD selected strings with the information of out of
  3581. the random access file channel from record r.  Note that you can only
  3582. use GET to retrieve records which are actually on disc.  If you try to
  3583. grab a record which does not exist, then an error will be generated.
  3584.  
  3585. Put channel,r
  3586.  
  3587. PUT moves a record from the Amiga's memory [following the FIELD
  3588. command's list of strings and sizes] to the record number in r to the
  3589. random access file channel.  Before using the PUT command, the strings
  3590. defined by the FIELD command should be defined.
  3591.  
  3592. Close [n]
  3593.  
  3594. Close channel number n.  IF n isn't supplied, Close will close all open
  3595. files.
  3596.  
  3597. Print#c,variable list
  3598.  
  3599. Print data to channel c.
  3600.  
  3601. Input#c,variable list
  3602.  
  3603. Input data from channel c.
  3604.  
  3605. Line Input#c,variable list    LINE Input#c,separator,variable list
  3606. Same as INPUT#, but allows you separate your list of data using any
  3607. character you wish.  If separator is omitted then the default is the
  3608. return character.
  3609.  
  3610. x$=Input$(f,count)
  3611.  
  3612. Read count number of characters from device number f.
  3613.  
  3614. flag=Eof(c)
  3615.  
  3616. Returns -1(TRUE) if the end of the file in channel c has been reached.
  3617.  
  3618. length=Lof(c)
  3619.  
  3620. Returns the length of the file in channel c.
  3621.  
  3622. pos=Pof(c)
  3623.  
  3624. Reads the current reading or writing position of the file in channel
  3625. number c.
  3626.  
  3627. Lprint variable list
  3628.  
  3629. Print a list of variables.
  3630.  
  3631. Ldir [path$][/W]
  3632.  
  3633. Print a directory.
  3634.  
  3635. Up to 16 AMAL programs can be run at the same time using
  3636. interrupts.  more may be executed but they will not be running on
  3637. interrupts.  Only the capital letters of an AMAL command are
  3638. significant.  Each AMAL program has its own set of 10 internal
  3639. registers.  Each register starts with the letter R and is
  3640. followed by a number from 0 to 9 (eg. R1,R2,R3...).There are 26
  3641. external registers that can be accessed by other AMAL programs or
  3642. directly from Basic.  They begin with the letter R and are
  3643. followed by another letter from A to Z (eg. RA,RB,RC...).
  3644.  
  3645. Special Registers
  3646. X and Y are internal registers and always contain the location of the
  3647. object being controlled by an AMAL program.  Another internal register
  3648. is A.  It contains the number of the image that is displayed by a
  3649. SPRITE or BOB.
  3650.  
  3651. Operators
  3652. AMAL expressions can include all the normal arithmetic operations,
  3653. except MOD.  You can also use the following logical operations:
  3654.    &   logical AND
  3655.    |   logical OR
  3656.  
  3657. Move deltaX, deltaY, n
  3658.  
  3659. Move object to deltaX,deltaY relative to the objects current position
  3660. in n number of steps.  If deltaX is positive the object will move to
  3661. the right, else to the left.  If deltaY is positive then the object
  3662. will move down, else up.  The smoothest movements are made when both
  3663. deltaX and deltaY are multiples of n.
  3664.  
  3665. Anim cycles,(image,delay)(image,delay)...
  3666.  
  3667. Animate an object.  cycles is the number of times the animation will
  3668. be repeated.  If cycles is 0 then the animation will be looped until
  3669. told to stop.  image is the image number to be displayed and delay is
  3670. the time measured in 50ths of a second that it will remain until the
  3671. next image is displayed.  After an animation command has been
  3672. initialized, AMAL will continue with the next instruction.
  3673.  
  3674. Let reg=exp
  3675.  
  3676. Save a value in an AMAL register.  Possible AMAL registers are R0-R9
  3677. and RA-RZ.
  3678.  
  3679. Jump L
  3680.  
  3681. Jump to label L.  Labels are defined as a single letter followed by a
  3682. colon.  A label name can be padded with lowercase letters to help them
  3683. read easier but make sure that the first letter of each label in an
  3684. AMAL program is different. (eg.  Start:  and  Shoot:  would be
  3685. considered the same thing and would cause an error.)
  3686.  
  3687. If exp Jump L
  3688.  
  3689. Perform a test and if the result is TRUE, then Jump to label L.
  3690. exp can be any logical expression  =,  <>,  <,  >.  Its common
  3691. practice to pad out this instruction with lowercase commands like
  3692. "then" or "else". (eg. If X>100 then Jump Label else Let X=X+1 ).
  3693.  If exp Direct L     If exp eXit
  3694. The above variations of the If command are used by the (AMAL)  AUTOTEST
  3695. feature explained later.
  3696.  
  3697. For reg=start To end ...Next reg
  3698.  
  3699. It is legal to have nested loops in an AMAL program but the step size
  3700. of the loop is always set to one.  Only one step of a loop is
  3701. performed every vertical blank period.
  3702.  
  3703. PLay n
  3704.  
  3705. Play series number n of movements stored in the AMAL bank.  These
  3706. movements are created using the AMAL accessory.  When the PLay command
  3707. is used R0 holds the tempo of the movements.  larger the number in R0,
  3708. the faster the object will move.  R1 controls the direction of the
  3709. movements.  If R1=1 then the movements are play forward.  If R1=0 then
  3710. the movements are played backward.  If R1= -1 then the movements are
  3711. stopped and AMAL continues with the next command.
  3712.  
  3713. End
  3714.  
  3715. Terminates the AMAL program and turns off the (AMAL)  AUTOTEST feature if
  3716. its been defined.
  3717.  
  3718. Pause
  3719.  
  3720. Wait for the next vertical blank period.  It is good practice to use a
  3721. Pause command before a (AMAL)  JUMP.
  3722.  
  3723. AUtotest (list of test)
  3724. AUtotest is a list of commands that are executed every 50th of a
  3725. second just before the main AMAL program is run.  The possible
  3726. commands that can be used in an AUtotest list are:
  3727.  
  3728. Let
  3729. Let reg=exp
  3730. Same as the regular AMAL command
  3731.  
  3732. Jump
  3733. Jump label
  3734. Same as the regular AMAL command except label must lie inside the
  3735. Autotest list.
  3736.  
  3737. eXit
  3738. eXit
  3739. Leave Autotest and continue with the main program.
  3740.  
  3741. Wait
  3742. Wait
  3743. Turn off the main AMAL program and only execute the AUtotest.
  3744.  
  3745. If
  3746. If exp Jump label   If exp Direct label   If exp eXit
  3747. Jump is the same as the regular AMAL command.  Direct will Jump
  3748. to a part of the main AMAL program after the AUtotest.  eXit will
  3749. leave AUtotest and continue with the main program.
  3750.  
  3751. On
  3752. On
  3753. Restart the main AMAL program after a Wait command.
  3754.  
  3755. Direct
  3756. Direct label
  3757. After AUtotest is complete, the main AMAL program will continue
  3758. at label.  label must lie outside of AUtotest.
  3759.  
  3760. Returns the X hardware coordinate of the mouse.
  3761.  
  3762. Returns the Y hardware coordinate of the mouse.
  3763.  
  3764. Returns a value of -1(TRUE) if the left mouse key has been pressed.
  3765.  
  3766. Returns a value of -1(TRUE) if the right mouse key has been pressed.
  3767.  
  3768. Returns a bit map containing the right joystick status.  See JOY for
  3769. more details.
  3770.  
  3771. Returns a bit map containing the left joystick status.  See JOY for
  3772. more details.
  3773.  
  3774. Returns a random number from 0 to n.
  3775.  
  3776. Converts screen coordinate x on screen s to a hardware coordinate.
  3777.  
  3778. Converts screen coordinate y on screen s to a hardware coordinate.
  3779.  
  3780. Converts hardware coordinate x to a screen coordinate on screen s.
  3781.  
  3782. Converts hardware coordinate y to a screen coordinate on screen s.
  3783.  
  3784. Identical to the BOB COL command.  Returns a value of -1(TRUE) if BOB
  3785. number n has collided with BOBs s to e.  This command can not be used
  3786. with an interrupt driven AMAL program.  See SYNCHRO for information on
  3787. non-interrupt AMAL programs.
  3788.  
  3789. Similar to (AMAL FUNCTION)  =BOB COL(N,S,E), above.
  3790.  
  3791. Returns a value of -1(TRUE) if object n has collided with another
  3792. object.  For use after an SpriteCol or BobCol command.
  3793.  
  3794. See (AMAL FUNCTION)  =BOB COL(N,S,E)
  3795.  or (AMAL FUNCTION)  =SPRITE COL(N,S,E).
  3796.  
  3797. Returns the volume (0-255) of the current voice.
  3798.  
  3799. Amal n,a$
  3800. Assign a$ to AMAL channel number n.  If n > 16 then the AMAL program
  3801. will not be interrupt driven.
  3802.  
  3803. Amal n,p
  3804. Assign AMAL program number p in the AMAL bank to AMAL channel n.
  3805.  
  3806. Amal n,a$ To address
  3807. Copy the contents of registers X, Y and A into an area of memory
  3808. starting at address.  The information will be saved like so:
  3809.  
  3810.   Location     Effect
  3811.   Address      Bit 0 is set to 1 if the X has changed.
  3812.                Bit 1 is set to 1 if the Y has changed.
  3813.                Bit 2 is set to 1 if the A has changed.
  3814.   Address+2    Is a word containing the latest value of X.
  3815.   Address+4    Holds the current value of Y.
  3816.   Address+6    Stores the value of A.
  3817.  
  3818. Amal On [n]    Amal Off [n]
  3819.  
  3820. Turn on all AMAL programs or just program number n.
  3821.  
  3822. Amal Freeze [n]
  3823.  
  3824. Stops all AMAL programs or just number n.  The AMAL programs can be
  3825. restarted with the AMAL ON command.  Its a good idea to freeze all
  3826. AMAL programs before disk access.
  3827.  
  3828. r=Amreg(n [,c])    Amreg(n [,c])=exp
  3829.  
  3830. Read an AMAL register or pass a value to an AMAL register. n is the
  3831. number of the register.  Possible values range from 0 to 25
  3832. representing RA to RZ.  If c is present then the internal registers of
  3833. the AMAL program in channel c can be accessed.  In this case n must be
  3834. between 0 and 9 representing R0 to R9.
  3835.  
  3836. Amplay tempo,direction[s To e]
  3837.  
  3838. Set parameters for AMAL play sequences in all channels or just
  3839. channels s to e.  tempo set the delay in 50ths of a second between
  3840. each movement.  direction is as follows:
  3841.  
  3842.     Value   Direction
  3843.      >0      Forwards
  3844.       0      Backwards
  3845.      -1      Stop movement pattern and continue with next AMAL command
  3846.  
  3847. s=Chanan(c)
  3848.  
  3849. Returns a value of -1(TRUE) if the Anim sequence in channel c is still
  3850. active.
  3851.  
  3852. s=Chanmv(c)
  3853.  
  3854. Returns a value of -1(TRUE) if the Move command in channel c is still
  3855. active.
  3856.  
  3857. p=Amalerr
  3858.  
  3859. Returns the position of an error in the current AMAL program.
  3860.  
  3861. Assign an AMAL channel to an object.
  3862.  
  3863. Assign sprite number s to AMAL channel n.  The X and Y registers
  3864. in the AMAL program will now control the hardware coordinates of
  3865. the sprite.
  3866.  
  3867. Assign BOB number b to AMAL channel n.  The X and Y registers in
  3868. the AMAL program will now control the screen coordinates of the
  3869. BOB.
  3870.  
  3871. Assign screen number d to AMAL channel n.  The X and Y registers
  3872. in the AMAL program now control the screen position in hardware
  3873. coordinates.
  3874.  
  3875. Assign screen number d to AMAL channel n.  The X and Y registers
  3876. in the AMAL program now control the screen offset.
  3877.  
  3878. Assign screen number s to AMAL channel n.  The X and Y registers
  3879. in the AMAL program now control the width and height of the
  3880. screen.
  3881.  
  3882. Assign rainbow number r to AMAL channel n.  The X register
  3883. controls the BASE of the rainbow and Y controls the starting line
  3884. and A stores the height.  X and Y are hardware coordinates.
  3885.  
  3886. Update Every n
  3887.  
  3888. Force AMAL programs to update only every n 50ths of a second.  This
  3889. may free up some time for the main program and a result could make
  3890. things run faster.
  3891.  
  3892. Rain(n,line)=c
  3893. c=Rain(n,line)
  3894.  
  3895. Set or Read the colour at line from rainbow n at any time.
  3896.  
  3897. Rainbow n,base,y,h
  3898.  
  3899. RAINBOW activates Rainbow n starting base lines into the rainbow
  3900. defination at hardware screen location y with a length of h lines.
  3901.  
  3902. See your manual page 141 for further information reguarding safeguards.
  3903.  
  3904. Set Rainbow n,colour,length,r$,g$,b$
  3905.  
  3906. SET RAINBOW defins a rainbow effect which can be subsequently displayed
  3907. using the RAINBOW command.  It works by changing the shade of a colour
  3908. according to a series of simple rules.
  3909.  
  3910. n is the number of your rainbow.  Possible values range from 0 to 3.
  3911.  
  3912. colour is the colour index which will be changed by the instruction. 
  3913. Note only 15 colours can be manipulated in this manner.
  3914.  
  3915. length is the size of the table used to store your colours.  There's one
  3916. entry in this table for each colour value on the screen.  The size can
  3917. range from 16 to 65500.  If length is less than the physical height of
  3918. your rainbow, then the colour pattern will be repeated for the full
  3919. length.
  3920.  
  3921. r$, g$, b$ are command strings which change the intensities of red,
  3922. green and blue respectively.  Each entry controls a single screen line.
  3923.  
  3924. Each string can contain a whole list of commands.  These will be cycled
  3925. until the final rainbow pattern is produced.  The format is:
  3926.  
  3927. "(n,step,count)(n,step,count)..."
  3928.  
  3929. n sets the number of lines to be assigned to the specific colour value
  3930. in the rainbow.
  3931.  
  3932. step holds the number to be added to the colour component [RGB] mod 15.
  3933.      [Each component can go from 0 to 15, if a value exceeds 15, it is
  3934.       set to 0.  As well, if a value goes below 0, it's set to 15.]
  3935.  
  3936. count is the number of times the current operation is to be repeated.
  3937.  
  3938. Synchro Off   Synchro On    Synchro
  3939.  
  3940. Release AMAL updating to Basic control.  If more then 16 AMAL channels
  3941. are going to be used then SYNCHRO must be used.  First, call SYNCHRO OFF
  3942. before defining the AMAL programs.  Then use SYNCHRO to activate the
  3943. next step in all the AMAL programs.  To return to normal interrupts
  3944. use SYNCHRO On.
  3945.  
  3946. Move X n,m$
  3947. Move Y n,m$
  3948.  
  3949. Define a movement for animation channel n.
  3950.  
  3951. m$ is the defination of movements.
  3952.  
  3953. Definations are as follows:
  3954.  
  3955. "(speed,step,count)(speed,step,count)...[E#/L]"
  3956.  
  3957. The E directive allows you to have your object stop when it reaches a
  3958. certain location on the screen, such as "E100" will ensure that the
  3959. current x or y stops at 100.
  3960.  
  3961. The L directive allows the MOVE command to loop back to the first entry.
  3962.  
  3963. speed is the delay in 50ths of a second between each step.  speed's range
  3964. is 1 (mega fast) and 32767 (super mega slow).
  3965.  
  3966. step is the amount the object will move.  [Positive or negative pixels.]
  3967.  
  3968. count is the amount of times you want to do this movement.
  3969.  
  3970. Example:  Move X 1,"(3,-4,10)E100"  will move the X -4 pixels every
  3971.           3/50th of a second for 10 times.  E100 will ensure that X never
  3972.           goes beyond 100.
  3973.  
  3974. See MOVE ON-OFF for more details.
  3975.  
  3976. Move On-Off [n]
  3977. Move On [n]
  3978. Starts MOVE n or all movements.  [Previously created using either the
  3979. MOVE X or MOVE Y command.]
  3980.  
  3981. Move Off [n]
  3982. Stops MOVE n or all movements.  [They can't be resumed after a stop.]
  3983.  
  3984. Move Freeze [n]
  3985.  
  3986. This will stop movement n or all movements.  [This is not perminant like
  3987. the MOVE OFF command.]
  3988.  
  3989. To resume movements, use the MOVE ON command.
  3990.  
  3991. x=Movon(n)
  3992.  
  3993. This returns a -1(TRUE) if the current channel has movement [a MOVE
  3994. command is running, not an AMAL movement].  Otherwize a 0(FALSE) is
  3995. returned.
  3996.  
  3997. Anim n,a$
  3998.  
  3999. Define an image animation for animation channel n.
  4000.  
  4001. a$ is the defination of the image animation, which is executed every 50th
  4002. of a second like AMAL animations.  Except these animations change the
  4003. object's image # [in a SPRITE/BOB Bank].
  4004.  
  4005. Definations are as follows:
  4006.  
  4007. "(image,delay)(image,delay)...[L]"
  4008.  
  4009. The L directive allows the ANIM command to loop back to the first entry.
  4010.  
  4011. image is the image # within a SPRITE/BOB Bank to be displayed for
  4012. the delay period.
  4013.  
  4014. delay specifies the amount of time the image remains (in 50ths of a
  4015. second).
  4016.  
  4017. Also see ANIM ON-OFF.
  4018.  
  4019. Anim On-Off [n]
  4020. Anim On [n]
  4021. Starts ANIM n or all image animations.  [Previously created using the
  4022. ANIM command.]
  4023.  
  4024. Anim Off [n]
  4025. Stops ANIM n or all image animations.  [They can't be resumed
  4026. after a stop.]
  4027.  
  4028. Anim Freeze [n]
  4029.  
  4030. This will stop movement n or all movements.  [This is not perminant like
  4031. the ANIM OFF command.]
  4032.  
  4033. To resume movements, use the ANIM ON command.
  4034.  
  4035. Track Load "Name_Of_The_Module",Bank
  4036.  
  4037. Load up a tracker module into a chip memory bank. It will of course it
  4038. reserve the bank for you, and choose the correct bank size.
  4039.  
  4040. If AMOS detects a Startracker synthetic instrument file (which must have
  4041. a ".NT" extension appended to the file name), it will load it AS WELL
  4042. into the bank. In fact you don't have to worry about it.
  4043.  
  4044. Track Play [Bank],[Pattern]
  4045.  
  4046. Plays a tracker module loaded into a bank.
  4047.  
  4048. "Bank" is the number of the bank to be played. If omitted, it is the last
  4049. loaded with the TRACK LOAD instruction, or upon running, bank number 5.
  4050.  
  4051. "Pattern" is the first pattern to be played. Use this with caution, as NO
  4052. CHECK is done on the number of the pattern. You can very simply crash the
  4053. computer by giving a bad value. This parameter is intended to allow you
  4054. to have more than one music in a tracker bank...
  4055.  
  4056. Track Loop On-Off
  4057.  
  4058. Enable or disable looping when the tracker music is finished.
  4059.  
  4060. Track Stop
  4061.  
  4062. Stops a tracker music being played.
  4063.  
  4064.  
  4065. The Tracker-playing instructions are implemented to give you a quick way
  4066. of playing modules. It is not as powerful as the normal AMOS music system.
  4067.  
  4068. For example:
  4069.  
  4070. * Do not play a normal AMOS music while playing a tracker module,
  4071.   this can lead to unpredictable results.
  4072.  
  4073. * Do not start any sample, or sound effect when a Tracker module is played.
  4074.  
  4075. * A Tracker module uses and initialises all four voices, even if your music
  4076.   is only on 3 or 2. So do not play any sample on the other voices you think
  4077.   are free. They are not!
  4078.  
  4079. * VOLUME instructions do not have any effect on the Tracker music, but
  4080.   =VUMETER works fine with a Tracker module.
  4081.  
  4082. ... if you want to make sound effects while a music is playing, then you
  4083. should use the Soundtracker converter, and the normal AMOS Music system...
  4084.  
  4085. Sload File_Number,Length To Address
  4086.  
  4087. A new instruction intended to load parts of a sample, but it can be used
  4088. in many other ways.
  4089.  
  4090. This instruction is an extended BLOAD.
  4091.  
  4092. "File_Number" is the number of a file opened previously with the
  4093. OPEN IN File_Number,"Name" instruction.
  4094.  
  4095. "Length" is the number of bytes to load. If this number is bigger than
  4096. the actual size of the file, then only the remaining bytes are loaded,
  4097. without errors. You'll get an error if you try to load once more after
  4098. the end has been reached.
  4099.  
  4100. "Address" is the destination address. Of course, the memory must have
  4101. been previously reserved.
  4102.  
  4103. The advantage of this instruction, is that you can set the position of
  4104. the file pointer with the POF()= instruction before using SLOAD. As you
  4105. can see, this instructions can have a lot more usage than just loading
  4106. samples...
  4107.  
  4108. Sam Swap Voices To Address,Length
  4109.  
  4110. This instruction initialise the sound-swapping. The actual swapping will
  4111. only occur when the actual buffer has been totally played through the
  4112. speaker. The swap is done under interrupts, so you will not hear any tick
  4113. in the sample.
  4114.  
  4115. "Voice" is a bit pattern to define the voice concerned, just like in the
  4116. SAM RAW instruction.
  4117.  
  4118. "Address" is the address of the next buffer to play. Of course, it must
  4119. be in chip memory.
  4120.  
  4121. "Length" is the number of bytes to play.
  4122.  
  4123. =Sam Swapped(Voice_Number)
  4124.  
  4125. This function returns a boolean value (TRUE -1, or FALSE 0). It is the
  4126. key function in synchronising double buffer players.
  4127.  
  4128. "Voice_Number" is the number of the voice you want to have information
  4129. about (0 to 3). Do not make mistake, is it NOT a bitpattern.
  4130.  
  4131. It returns TRUE if the sample swapping has occurred, it means the new
  4132. buffer you have initialised with the SAM SWAP instruction is being
  4133. played at the very moment. It returns FALSE if not.
  4134.  
  4135. Practically, you can only load a new part of the sample in the free
  4136. buffer, when the SAM SWAPPED instruction returns you a TRUE value. It
  4137. returns FALSE if the sample swapping has NOT happened.
  4138.  
  4139. Sam Stop [Voice_Pattern]
  4140.  
  4141. This simple instruction seems to have been forgotten in the instruction
  4142. set since the beginning. The only way to stop a sample playing, was to
  4143. use the PLAY instruction!
  4144.  
  4145. "Voice_Pattern" is a bit pattern defining the voices to be stopped, like
  4146. in the SAM RAW instruction. All voices will be affected if you omit it.
  4147.  
  4148.  
  4149. NOTE: it is perfectly possible to have an AMOS music bank playing on 2
  4150. voices, and double-buffered samples playing on the last 2. (hey, but not
  4151. a Tracker module, if you remember what I told you!)
  4152.  
  4153.  
  4154. Well, in fact, it is not a new instruction, but a good enhancement to the
  4155. collision detection method.
  4156. To detect a collision, I remind you, you have to use one of the collision
  4157. detection functions (=BOB COL(), =SPRITE COL(), =BOBSPRITE COL(),
  4158. =SPRITEBOB COL()). When this function returns a TRUE value, you have
  4159. to explore the =COL() reserved array to find out which bob or sprite
  4160. created the collision.
  4161. The problem, is that you had to write a loop exploring sequentially all
  4162. the COL() array. This was eating a lot of processor time. You could see
  4163. certain games slowing down when some bobs were colliding.
  4164.  
  4165. I wanted to do something to correct it. But what? The problem with AMOS,
  4166. is that if I change the syntax or the behaviour of one instruction to
  4167. please certain people, it may (and surely will) not be compatible with
  4168. thousand of existing programs!
  4169. So I found a -rather tricky- solution to this problem.
  4170.  
  4171. =COL(Number) behaves normally if you send it a POSITIVE number as an
  4172. argument, this keeps it compatible with all existing programs.
  4173.  
  4174. If "Number" is negative, AMOS will first remove the sign, i.e. turn it
  4175. into a positive number.
  4176. Then it will explore the COL() array himself, and find the first
  4177. non-zero value higher than -Number. Then it will not return Z0B3TRUEB0Z: or Z0B3FALSEB0Z;
  4178. as it used to, but the actual number of the bob colliding.
  4179. To get the next bob colliding, simply call it again with a this number,
  4180. minus one..
  4181.  
  4182. Example, this small and fast loop, will give all bobs colliding with bob
  4183. zero:
  4184.  
  4185. B=Z0B3Bob ColB0Z<(0)
  4186. BB=0
  4187. Z0B3RepeatB0Z=
  4188.    BB=Z0B3ColB0Z>(-(BB+1))
  4189.    Z0B3IfB0Z? BB
  4190.       Z0B3PrintB0Z@"Bob";BB;" is colliding..."
  4191.    Z0B3End ifB0ZA
  4192. Z0B3UntilB0ZB BB=0
  4193.  
  4194. You can certainly remark that with this method, it is impossible to get the
  4195. collision of bob number zero. That's why I say this was not perfect...
  4196.  
  4197. =Disc Info$("Name")
  4198.  
  4199. ...is a new instruction that returns information on any disc.
  4200.  
  4201. "Name" is the name of a file or a directory of the disc you want to have
  4202. information about. The string returned has the following form:
  4203.  
  4204. "NAME_OF_THE_DISC:XXXXXXX" , where XXXXXXX is the free space on the disc.
  4205.  
  4206. To get both, use this simple method:
  4207.  
  4208. A$=DiscInfo$("Df0:")
  4209. C=INSTR(A$,":")
  4210. N$=LEFT$(A$,C)
  4211. F=VAL(A$,C+1)
  4212. PRINT "Name of the disc :";N$;" Free space:";F
  4213.  
  4214. =Prg State (returns the current status of a program)
  4215.  
  4216. =Prg State
  4217.  
  4218. This little handy function let you know how your program was launched.
  4219. It returns three possible values:
  4220.  
  4221.   0 : if your program was run under the AMOS interpreter.
  4222.   1 : if your program was run under RAMOS run-only.
  4223.  -1 : if your program is compiled.
  4224.  
  4225. Bgrab b
  4226.  
  4227. b is the bank that Bgrab "borrows" from the current program being
  4228. edited.  [This only works from within an Accessory.]  If there is a bank
  4229. already in the accessory, it's erased and replaced with the new one. 
  4230. When you exit the Accessory, the "borrowed" bank will be returned to the
  4231. main program along with any changes.  [Bank #'s 1 to 15.]
  4232.  
  4233. Note:  This instruction can only be done in an Accessory.  If you
  4234. attempt it otherwize, you'll get an appropriate error.
  4235.  
  4236. Prun "filename"
  4237.  
  4238. This is identical to choosing the Run Other from the Editor's menu.
  4239.  
  4240. Also, all screens/sprites/bobs/music will need to be kept prior to using
  4241. the PRUN command and restored by your program after the PRUN has
  4242. finished, to ensure your data remains intact.  See EXAMPLE 3.3 in the
  4243. MANUAL folder on your AMOS1.2 PROGRAM disk.
  4244.  
  4245. p$=Prg First$
  4246.  
  4247. This returns the name of the first AMOS basic program in memory [loaded
  4248. with the Load Other editor option].  It's used in conjunction with the
  4249. PRG NEXT$ command to create a full list of available programs.
  4250.  
  4251. p$=Prg Next$
  4252.  
  4253. This is used after the PRG FIRST$ command to continue to read the
  4254. available AMOS basic programs in memory [loaded with the Load Other
  4255. editor option].  When the list is complete, a string of "" will be
  4256. returned.
  4257.  
  4258. n$=Psel$("filter",[default$,title1$,title2$])
  4259.  
  4260. PSEL$ calls up a program selector simular to the one used by Run Other,
  4261. Load Others, Edit Others and New Others.  This can be used to select a
  4262. program in the usual manner.  The selected file will be returned in n$,
  4263. which can be PRUN.  If QUIT was selected, n$ will be set to "".
  4264.  
  4265. filter sets the type of programs which will be listed by this
  4266. instruction.  These can be:
  4267.  
  4268. "*.ACC"   List Accessories.
  4269. "*.AMOS"  List Amos programs.
  4270. "*.*"     List All files.
  4271.  
  4272. For further details, see the FSEL$ and DIR commands.
  4273.  
  4274.  
  4275. You will find on your updated disc (1.34) a program called "GET_TIME.AMOS".
  4276. This program includes two procedures to get the time and date from
  4277. the system.
  4278.  
  4279.   Time.
  4280.   -----
  4281. Call the procedure, and you'll have in Param$ the current clock time under
  4282. the following format: 00:00:00
  4283.  
  4284. _TIME$
  4285. PRINT Param$
  4286. ...
  4287. 11:04:04
  4288.  
  4289.  
  4290. You will find on your updated disc (1.34) a program called "GET_TIME.AMOS".
  4291. This program includes two procedures to get the time and date from
  4292. the system.
  4293.  
  4294.   Date.
  4295.   -----
  4296. This procedure returns the current date in Param$:
  4297.  
  4298. _DATE$
  4299. PRINT Param$
  4300. ...
  4301. 21/06/1991
  4302.  
  4303. Safe AmigaDos EXECUTE.
  4304.  
  4305. It is perfectly possible to launch an external program from AMOS. But in
  4306. order to do so, you have to know some of the AmigaDos internal functions.
  4307. That's why you will find on your updated disc a small program with a
  4308. procedure called _EXECUTE.
  4309. Just transmit an AmigaDos command to this procedure, and it will launch
  4310. it out of AMOS. To run an external program, use:
  4311.  
  4312. _EXECUTE["RUN >NIL: <NIL: Program_Name.AMOS"]
  4313.  
  4314. You can launch other CLI commands (like "Assign"). Of course
  4315. if you want to see the display, you have to perform an AMOS TO BACK
  4316. instruction.
  4317.  
  4318. As the Amiga is a multitask machine, your AMOS program will go on running
  4319. as well as the launched program. Of course the speed will be bit reduced,
  4320. depending on the other program.
  4321.  
  4322. NO Icon MASK [number] (Remove the mask from an icon).
  4323.  
  4324. This instruction has simply been forgotten in the manual. It simply
  4325. does the same job as NO MASK, but for icons.
  4326.  
  4327. Rainbow Del [Number] (Delete on or all rainbows).
  4328.  
  4329. Another instruction forgotten in the manual, but very useful when you
  4330. want to get rid of a rainbow!
  4331. "Number" specify the number of the rainbow to remove, or all if omitted.
  4332.  
  4333. Multi Wait  (Force a multi-task wait vbl)
  4334.  
  4335. To make effective multi-tasking programs, you must not grab most of the
  4336. processor time, leaving only a limited amount of power for other tasks.
  4337. MULTI WAIT does a MULTI-TASK wait vbl. You should use it in your
  4338. programs main loop, when you wait for example, for a menu item to be
  4339. selected.
  4340.  
  4341.    Note that you should not use this instruction to make accurate
  4342. screen synchronisation as it is designed to multi-task. This instruction
  4343. is not consistent at all! It may skip many VBLs, depending on the number
  4344. of running tasks at the time.
  4345.  
  4346.    If you missed it elsewhere in the manual, Multitasking can be
  4347. activated by pressing Amiga+A to flick between AMOS and the CLI or
  4348. Workbench environments. This allows systems with at least 1 meg to run
  4349. AMOS and programs like DPaint III at the same time!
  4350.  
  4351. Amos To Back  (Hide AMOS from view and show the Workbench)
  4352.  
  4353. This will bring forward the Workbench display, allowing you to access
  4354. other programs.
  4355.  
  4356. Amos To Front  (Switch AMOS to the display)
  4357.  
  4358. AMOS is forced back onto the display with this command, leaving the
  4359. Workbench hidden.
  4360.  
  4361. x=Amos Here  (Report which task is on display)
  4362.  
  4363. This returns TRUE if AMOS is currently displayed and FALSE if the
  4364. Workbench is in view.
  4365.  
  4366. Amos Lock (Locks AMOS in front position)
  4367.  
  4368. This instruction first does an "AMOS TO FRONT", and then disable
  4369. the AMIGA-A system. Use this instruction if you do not want people
  4370. to know your program was written in AMOS.
  4371.  
  4372. Amos Unlock (make AMIGA-A active)
  4373.  
  4374. Just restores the AMIGA-A Workbench/AMOS flipping. You may want people to
  4375. stay under AMOS during certain parts of your program for example, to
  4376. see your name (!) and then free them.
  4377.  
  4378. Bank Swap number1,number2
  4379.  
  4380. This instruction will swap the pointers of the two banks. Useful if you
  4381. want to turn an icon bank into a sprite bank. Example:
  4382.  
  4383.    Bank Swap 1,2
  4384.  
  4385. or have more than one music bank at the same time, for example:
  4386.  
  4387.    Bank Swap 3,5
  4388.  
  4389. Laced (Function to open an interlaced screen)
  4390.  
  4391. To open an interlaced screen use the following syntax:
  4392.  
  4393. SCREEN OPEN 0,320,200,16,LACED [+HIRES] [+LOWRES]
  4394.  
  4395. LACED is a function that returns 4.
  4396.  
  4397. Important: As soon as one screen is opened with Interlace, all the other
  4398. screens turn to interlace. The interlacing will only truly effect the
  4399. screen actually opened with LACED. All the others will just have their
  4400. vertical lines doubled on the screen to adjust to the special mode.
  4401.  
  4402.    Interlaced mode is perfect for displaying pictures, but
  4403. animation runs at half normal speed. Games should not be written in
  4404. Interlace!
  4405.  
  4406.    As soon as the last interlaced screen is closed the whole
  4407. display returns to normal mode. Your TV monitor might not like lots of
  4408. fast switching from normal mode to Interlace, so you are advised not to
  4409. do this excessively.
  4410.  
  4411.    All normal operations are available in interlaced screens:
  4412. SCREEN OFFSET, SCREEN DISPLAY and so on. The only problem that arises is
  4413. due to interlacing being software driven in AMOS. The bitplanes are
  4414. changed during the vertical blank and this particular interlace process
  4415. is forbidden during copper list calculation.
  4416.  
  4417.    So if you have a large copper list (i.e.. four screens, one
  4418. interlaced, and a rainbow), and have a copper calculation to do, the
  4419. interlaced screen will display only half of the picture during the
  4420. calculation. Nothing can be done to solve this, it is simply a
  4421. limitation of the whole system.
  4422.  
  4423. There are two extra screen commands in AMOS now. These allow a program
  4424. to work out what type of display it is being run on:
  4425.  
  4426. =Display Height  (Report how tall a screen can be)
  4427.  
  4428. This command returns 311 in PAL and 263 in NTSC.
  4429.  
  4430. =Ntsc (Flags the type of display in operation)
  4431.  
  4432. This returns TRUE if the system is in NTSC mode or FALSE if in PAL.
  4433. Ideal for international software development!
  4434.  
  4435.    NTSC refreshes the screen at 60 times a second whereas PAL
  4436. screens refresh at only 50 times a second. However, AMOS1.3 compensates
  4437. for this and now music runs at exactly the same speed in PAL and NTSC
  4438.  
  4439.    AMAL also relies on the interrupt routine but is not slowed down
  4440. to comply with PAL speeds. You must therefore be careful not to
  4441. synchronise music and animations by just relying on the speed they run
  4442. at. Check that an animation frame has been reached or the music has
  4443. played a certain note. Using this technique you'll ensure the software
  4444. executes at the right points on all systems.
  4445.  
  4446. Request On (Generate a requester routine)
  4447.  
  4448. This will make AMOS use its own requester routine and is the
  4449. default.
  4450.  
  4451. See REQUEST WB for important usage notes.
  4452.  
  4453. Request Off
  4454.  
  4455. AMOS will always select the CANCEL button of the requester if this
  4456. command is used. The actual requester will not be displayed, so this is
  4457. ideal for error trapping within a program.
  4458. See REQUEST WB for important usage notes.
  4459.  
  4460. Request Wb
  4461.  
  4462. This tells AMOS to switch back to Workbench's system requester. You'll
  4463. come back to AMOS as soon as you have chosen one of the options.
  4464.  
  4465. Note: If you don't load up the Requester (by deleting it from the
  4466. extension list using the config file), the normal Workbench requester
  4467. will be used for displaying messages.
  4468.  
  4469. This does have a bad side-effect though, AMOS will seem to have crashed
  4470. when a requester appears. If this happens you must simply press Amiga+A
  4471. to return to the Workbench, answer the question and press Amiga+A once
  4472. again to return to AMOS. It's only best to avoid loading the requester
  4473. when memory is very low!
  4474.  
  4475. Bob and sprite flipping commands.
  4476.  
  4477. In a great number of games, the main character needs to animate left to
  4478. right, and up and down. Up to now, you were obliged to keep in the
  4479. sprite bank reversed copies of small animation sequences for the main
  4480. character. As the main character usually has the best animation, you
  4481. lose an enormous amount of space!
  4482.  
  4483.    For the game RanXerox, for which AMOS author François Lionet
  4484. wrote the sprite routines, a flipping routine was developed which
  4485. allowed just one copy of the main character to be kept in the bank. This
  4486. routine has been enhanced and placed into AMOS.
  4487.  
  4488.    How does it work? Imagine your character is walking to the left
  4489. and then back to the right. You would only have in your bank the image
  4490. of him walking to the right. To display this right image, you simply
  4491. refer to the image number in the bank as usual.
  4492.  
  4493.    To display the image reversed in the X axis (left walking
  4494. image), you set bit number 15 of the image number to 1. Don't panic, you
  4495. can simply do it with:
  4496.  
  4497.    $8000+Image number
  4498.  
  4499. So:
  4500.  
  4501.    BOB 1,160,100,1
  4502.  
  4503. will display your character walking right, and:
  4504.  
  4505.    BOB 1,160,100,$8000+1
  4506.  
  4507. will display it walking left. The same principle is used for vertical
  4508. reversing. For this, bit number 14 is used - add $4000 to the image
  4509. number. To have a vertical and horizontal reversing, use $C000.
  4510.  
  4511.    The symmetry is a full symmetry: The hot spot of the bob is also
  4512. reversed. For example, if we had put the hot spot in X under the feet of
  4513. our character, the reversed version would also have it under his feet.
  4514. So be careful if you set the hot spot on the top left corner on a bob,
  4515. the reversed image will be displayed at the top left!
  4516.  
  4517.    You might say that $8000 and $C000 are a bit weird to use. We
  4518. have provided special functions to give a better AMOS interface:
  4519.  
  4520.    =Hrev(image)      adds $8000 to the image
  4521.    =Vrev(image)      adds $4000
  4522.    =Rev(image)       adds $C000
  4523.  
  4524. Use them in place of the hex values:
  4525.  
  4526.    Bob 1,160,100,10
  4527.    Bob 1,160,100,Hrev(10)
  4528.    Bob 1,160,100,Vrev(10)
  4529.    Bob 1,160,100,Rev(10)
  4530.  
  4531. To allow easy use of the bob flipper in AMAL, we have implemented
  4532. Hexadecimal evaluation. So you can use hex notation to refer easily to
  4533. reversed bobs. If hex frightens you, just add $8000, $4000 or $C000
  4534. before all references in your AMAL strings. Example:
  4535.  
  4536. Old AMAL string:
  4537.  
  4538.    "Anim 0,(1,2)(2,2)(3,2)(4,2)"
  4539.  
  4540. New reversed string:
  4541.  
  4542.    "Anim 0,($8000+1,2)($8000+2)($8000+3)($8000+4)"
  4543.  
  4544. or
  4545.  
  4546.    "Anim 0,($8001,2)($8002,2)($8003,2)($8004,2)"
  4547.  
  4548. If you use a register to calculate the image number, do not try to
  4549. modify the calculation itself, but only when you assign the register to
  4550. the image.
  4551.  
  4552. Old AMAL string:
  4553.  
  4554.    For R0=1 To 10; Let A=R0; Next R0
  4555.  
  4556. New one:
  4557.  
  4558.    For R0=1 To 10; Let A=$C000+R0; Next R0
  4559.  
  4560.  
  4561. How does the flip routine work?
  4562.  
  4563. It is really important for you to understand how it works internally, so
  4564. that you do not ask this system to do things it is not designed to do.
  4565.  
  4566.    The reversing system is designed to free memory before trying to
  4567. be fast (although we would not mind if it was actually fast, would we?).
  4568. Concessions had to be made to have it fast, and at the same time easy
  4569. and powerful.
  4570.  
  4571.    The routine actually works right in the middle of the bank, and
  4572. does not use any extra memory. The bobs are flipped during the update
  4573. process, just before a bob is redrawn on the screen. AMOS looks to see
  4574. if the image needs to be flipped in the bank. If it does, it is flipped
  4575. and a flag is set within the bank. On the next update, if the bob image
  4576. has not changed, it will not be flipped, thus saving a lot of time.
  4577.  
  4578.    If you understand the above, you will also realise one big
  4579. limitation. It is not wise to use more than one flipped bob pointing to
  4580. the same image. Let's see the next example:
  4581.  
  4582.    BOB 1,160,100,1
  4583.    BOB 2,160,150,$8001
  4584.    BOB 3,20,20,$4001
  4585.    BOB 4,20,100,$C001
  4586.    UPDATE
  4587.  
  4588. During the Z0B3UPDATEB0Z: process, AMOS will first draw bob number 1. No
  4589. problem, it is in the right position. Then bob number 2 - AMOS needs to
  4590. reverse it in X. Bob number 3 needs a Y and an X reversing (to put the
  4591. bob back to normal in X!). Then bob number 4 needs an X flipping.
  4592.  
  4593.    On the next update, providing the bob's image has not changed,
  4594. to display bob 1, AMOS will have to flip it in X and Y, then bob 2...
  4595.  
  4596.    As you can see, for each Z0B3UPDATEB0Z;, that is, every 50th of second,
  4597. if the bobs move they need to be reversed! This will work, but will take
  4598. a lot of processor time, and the animation will be disastrous.
  4599.  
  4600.    So the golden rule is, use the reversed bobs for objects alone
  4601. on a screen (or be sure that normal and reversed images are not
  4602. displayed at the same time on the screen). If you want, you can have two
  4603. bobs like this - experiment!
  4604.  
  4605.    We told you before that this system was for use with bobs. Yes,
  4606. it is totally automatic with bobs. But as it directly affects the sprite
  4607. bank, you can also use it with sprites.
  4608.  
  4609.    When a hardware computed sprite is calculated, AMOS looks into
  4610. the sprite bank and gets the image from it. If the image is reversed at
  4611. that moment, the hardware sprite will display a reversed image. You can
  4612. therefore have reversed hardware sprites using this method. But you
  4613. cannot do this for example:
  4614.  
  4615.    Z0B3SpriteB0Z< 1,200,200,$8001
  4616.  
  4617.  
  4618. Pasting flipped bobs
  4619.  
  4620. Z0B3PASTE BOBB0Z= also accepts reversed images. A simple trick to reverse an
  4621. image in the bank without having to display a bob, is to PASTE the
  4622. reversed image outside of the screen. Example:
  4623.  
  4624.    Z0B3Paste BobB0Z> 500,500,$C000
  4625.  
  4626. This will reverse image 4 in the bank, without any output (and quite
  4627. fast).
  4628.  
  4629. Collision detection
  4630.  
  4631. This is an important point, and you have to be very careful when you
  4632. detect collisions with reversed bobs!
  4633.  
  4634.    The collision detection uses the shapes in the bank at the very
  4635. moment it is called. Let's see an example that will never work:
  4636.  
  4637.    Z0B3BobB0Z? 1,160,100,1
  4638.    Do
  4639.          Z0B3BobB0Z@2,XScreen(XMouse),YScreen(YMouse),$8001
  4640.          Z0B3Wait VblB0ZA
  4641.          Z0B3ExitB0ZB if Z0B3Bob ColB0ZC(1)
  4642.    Loop
  4643.  
  4644. Why doesn't it work? We have two reversed images of the same definition
  4645. in the bank. After the updating process, the image in the bank is left
  4646. reversed. So the Z0B3Bob ColB0ZD instruction will take bob shape 1, the reversed
  4647. image, and this will not work!
  4648.  
  4649.    So remember: Thou shalt never use collision detection with more
  4650. than one reversed image on the screen!
  4651.  
  4652. How is it coded into the sprite bank?
  4653.  
  4654. Two bits of each images X Hot Spot are used to flag the flipping (at
  4655. Z0B3SPRITE BASEB0ZE+6).
  4656.  
  4657. Bit number 15 for X  0 if normal, 1 if reversed
  4658. Bit number 14 for Y  0 if normal, 1 if reversed
  4659.  
  4660. Before RUN and SAVE, the bank is restored to its normal state, so that
  4661. it is still compatible with version 1.1.
  4662.  
  4663. Hrev Block  (Flip a block horizontally)
  4664.  
  4665. Hrev Block image
  4666.  
  4667. Flips block number image horizontally.
  4668.  
  4669. Vrev Block  (Flip a block vertically)
  4670.  
  4671. Vrev Block image
  4672.  
  4673. Flips block number image vertically.
  4674.  
  4675. Priority Reverse On-Off  (Change the order in which Bobs are printed to
  4676. the screen)
  4677.  
  4678. Priority Reverse On
  4679. Priority Reverse Off
  4680.  
  4681. Priority Reverse On, reverses the entire bob's priority table. This
  4682. means that bob number 1 will be the first one drawn in front of all
  4683. other bobs, 2 will come in second etc... This priority list is
  4684. compatible with STOS.
  4685.  
  4686.    This instruction has another feature when used in conjunction
  4687. with the PRIORITY ON command. The bobs are not printed from TOP to
  4688. BOTTOM any more, but from BOTTOM to TOP! The highest bob on the screen
  4689. will be displayed in front of the others.
  4690.  
  4691. Serial Open (Opens a channel for Serial I/O)
  4692.  
  4693. Serial Open channel, port_no [,shared, xdisabled, 7wires]
  4694.  
  4695. Opens a communication channel to a serial device.
  4696.  
  4697. Channel This is an identification number which will be used for all
  4698. subsequent communication commands. Allowable values range from 0 to 3.
  4699.  
  4700. Port_no Specifies the logical device number of the serial port.
  4701. Normally, this value should be set to zero. However, if you've plugged a
  4702. MULTI SERIAL card into your Amiga, you can access your additional ports
  4703. using the numbers from one onwards.
  4704.  
  4705. Shared (optional) This is a flag which informs AMOS that the device can
  4706. be shared with other tasks which are currently running on your Amiga.
  4707. It's used in multitasking. A value of FALSE (zero) will grab the channel
  4708. for AMOS Basic, and will deny access to any other program. If it's is
  4709. set to TRUE (-1), the serial port can be shared between several programs
  4710. in memory. Beware: This system must be used with extreme care or the
  4711. Amiga could easily crash!
  4712.  
  4713. Xdisabled (optional) Toggles XON/XOFF checking during transmission of
  4714. your data over the serial line. It's essential to set this flag when you
  4715. are first opening the device, even if it will only be required later.
  4716. The default value is FALSE (0) and disables the system. If you want to
  4717. enable the checking, use a value of TRUE (-1). After the port has been
  4718. opened, you'll then need to set the XON and XOFF characters using a
  4719. separate call to the Serial X command.
  4720.  
  4721. 7Wires (optional) A value of TRUE (-1) tells the device to use the 7
  4722. wires system as explained in the official Commodore documentation. The
  4723. default is FALSE (0).
  4724.  
  4725. When you call the Serial Open command for the first time, it will
  4726. automatically load the SERIAL.DEVICE library from your system disc. So
  4727. make sure it's available from the current drive.
  4728.  
  4729. Default settings depends on the number in "Port_no":
  4730.  
  4731. -Port_no=0 refers to the default serial port, it will be opened using the
  4732. parameters set in the "Preference" workbench program. You should open this
  4733. port if you use the workbench.
  4734.  
  4735. -Port_no=1 refers to the built in serial port. Every Amiga has one. This
  4736. is the port you should open. The default settings will be set for this port
  4737. to use the French minitel: 1200 Baud, 7 bits, 1 stop bit, Even parity.
  4738. This can be easily changed using the SERIAL SPEED, SERIAL BITS or
  4739. SERIAL PARITY instructions if required.
  4740.  
  4741. -Port_no>1 can only be used if you have a multi-serial card.
  4742.  
  4743. Serial Close (Closes one or more serial channels)
  4744.  
  4745. Serial Close [channel]
  4746.  
  4747. If you don't include the channel number, Serial Close will close all
  4748. currently opened serial channels with absolutely no error checking. The
  4749. optional channel number allows you to close a single channel and uses
  4750. all the normal error checks.
  4751.  
  4752. Note: Whenever a program is RUN from AMOS Basic, any opened channels
  4753. will be automatically closed for you.
  4754.  
  4755. Serial Send  (Output a string via a serial channel)
  4756.  
  4757. Serial Send channel, t$
  4758.  
  4759. Sends the string t$ straight to the specified serial channel. It does
  4760. not wait for the data to be transmitted through the actual port. You'll
  4761. therefore need to use the =SERIAL CHECK(Channel) function to detect when
  4762. the transmission has been completed.
  4763.  
  4764. Serial Out  (Outputs a memory block via a serial channel)
  4765.  
  4766. Serial Out channel, address, length
  4767.  
  4768. This is identical to SERIAL SEND except that it works with RAW data.
  4769.  
  4770. Address is the address of your data in memory.
  4771. Length is the number of bytes to be sent.
  4772.  
  4773. Serial Get  (Gets a byte from a serial device)
  4774.  
  4775. =Serial Get(channel)
  4776.  
  4777. Reads a single byte from the serial device. If nothing is available a
  4778. value of -1 will be returned.
  4779.  
  4780. Serial Input$  (Gets a string from the serial port)
  4781.  
  4782. =Serial Input$(channel)
  4783.  
  4784. Reads an entire string of characters from the serial port. If there's no
  4785. data, the command will return an empty string "". Otherwise the string
  4786. will contain all the bytes which have been sent over the serial line up
  4787. to the present time.
  4788.    Be careful when using this command with high speed transfers
  4789. (such as MIDI). If you wait too long between each Serial Input$ command,
  4790. you can overload the system completely, and generate annoying errors
  4791. such as "string too long" or "serial device buffer over-run".
  4792.  
  4793. Serial Speed  (Sets the transfer baud rate for a serial channel)
  4794.  
  4795. Serial Speed channel, baud rate
  4796.  
  4797. Sets the current transfer rate of the appropriate channel. The same
  4798. value will be used for both reading and writing operations. Note that
  4799. you can't set split baud rates for a single channel. If the baud rate
  4800. you have specified is not supported by the current device, it may be
  4801. rejected by the system.
  4802.  
  4803. Serial Bits  (Sets the Nbit & Stopbit part of a protocol)
  4804.  
  4805. Serial Bits channel, nbits, stopbits
  4806.  
  4807. Assigns the number of bits which will be used for each character you
  4808. transmit.
  4809.  
  4810. Nbits is the number of bits
  4811. Stopbits is the number of STOP bits
  4812.  
  4813. Serial Parity  (Sets the parity checking, correct version)
  4814.  
  4815. Serial Parity channel, parity
  4816.  
  4817. Sets the parity checking you are using for the current serial channel.
  4818. Here's a list of the available options.
  4819.  
  4820. Parity can have 5 different states:
  4821.  
  4822.    -1 : no parity
  4823.     0 : EVEN parity
  4824.     1 : ODD parity
  4825.     2 : SPACE parity
  4826.     3 : MARK parity
  4827.  
  4828. See the Commodore documentation for a full explanation of this system.
  4829.  
  4830. Serial X  (Sets XON/XOFF)
  4831.  
  4832. Serial X channel, xmode (Activates/deactivates the XON/XOFF handshaking
  4833. system)
  4834.  
  4835. A value of TRUE for Xmode disables handshaking. Any other value turns it
  4836. on. Xmode should be loaded with the correct control characters. These
  4837. must be specified in the following format:
  4838.  
  4839.    Xmode=XON*$10000000+XOFF*$10000
  4840.  
  4841. Check Commodore's documentation for more information.
  4842.  
  4843. Serial Buffer  (Sets the size of the serial buffer)
  4844.  
  4845. Serial Buffer channel, length
  4846.  
  4847. Allocates length bytes of buffer space for the required channel. Note
  4848. that the default value is 512 bytes and the minimum allocation is 64
  4849. bytes.
  4850.  
  4851.    It's a good idea to increase the buffer size for high speed
  4852. transfers.
  4853.  
  4854. Serial Fast  (Switches on FAST transfer mode)
  4855.  
  4856. Serial Fast channel
  4857.  
  4858. This sets a special fast flag in the current device and disables a lot
  4859. of internal checking which would otherwise slow down the communication
  4860. process. Use it for high speed transfers such as MIDI.
  4861.  
  4862. Warning: When you call this command, the protocol will be changed to:
  4863. PARITY EVEN,NO XON/XOFF and 8 bits.
  4864.  
  4865. Serial Slow  (Switches serial transfer back into SLOW mode)
  4866.  
  4867. Serial Slow channel
  4868.  
  4869. Slows the serial device back to normal speed and reactivates all the
  4870. error checks.
  4871.  
  4872. Serial Check  (Reports on current serial device activity)
  4873.  
  4874. =Serial Check(channel)
  4875.  
  4876. Asks the device for a read-out of its current status. You can use it to
  4877. check whether all the information you've transferred with a previous
  4878. SERIAL SEND command has been sent.
  4879.  
  4880.    CHECK=FALSE (0) -> if the last serial command is still being
  4881. executed.
  4882.  
  4883.    CHECK=TRUE (-1) -> All done!
  4884.  
  4885. Serial Error  (Reports success or failure of last transfer)
  4886.  
  4887. =Serial Error(channel)
  4888.  
  4889. Looks for the ERROR byte in the serial device. A value of zero indicates
  4890. that everything is fine. Otherwise, the last transmission was faulty.
  4891.  
  4892. Sending large strings
  4893.  
  4894. Transmitting a large string may take quite a long time, especially at
  4895. low baud rates. As AMOS is multitasking, your program will continue to
  4896. run AFTER a SERIAL SEND instruction.
  4897.  
  4898.    It's essential to avoid provoking a garbage collection before
  4899. the transfer has been completed, otherwise your data will be corrupted.
  4900. So:
  4901.  
  4902.    Use the =SERIAL CHECK function before doing a lot of string work.
  4903.    Perform a garage collection using X=FREE to ensure that your program
  4904. will not provoke one automatically.
  4905.  
  4906.    Use the SERIAL OUT channel,address,length instruction
  4907. with 'address' containing the location of a previously reserved memory
  4908. bank.
  4909.  
  4910. More information about the Amiga's serial system can be found in the
  4911. Commodore ROM KERNEL Reference Manual, Library and Devices. This will
  4912. allow expert users to make maximum use of the serial device.
  4913.  
  4914. =Dev First$  (Get first device from the current device list)
  4915.  
  4916. dev$=Dev First$("filter")
  4917.  
  4918. Works the same as DIR FIRST$ and DIR NEXT$, but reports back the device
  4919. list. Note that you should remove the spaces with -" " to get the right
  4920. name.
  4921.  
  4922. =Dev Next$  (Get the next device satisfying the filter)
  4923.  
  4924. dev$=Dev Next$
  4925.  
  4926. Gets the next device from the device list. A null string indicates the
  4927. end of the list has been reached. Example:
  4928.  
  4929.    PRINT DEV FIRST$
  4930.    Do
  4931.          A$=Dev Next$
  4932.          A$=A$-" "
  4933.          IF A$="" THEN END
  4934.          PRINT A$
  4935.    Loop
  4936.  
  4937. Set Tempras [address,size]
  4938.  
  4939. Warning, due to the nature of this instruction, it is suggested you
  4940. re-read the command in your manual and all of it's associated commands.
  4941.  
  4942. Set Tempras is in your manual on page 71.
  4943.  
  4944. Rem Comment.
  4945. ' Comment.
  4946.  
  4947. Note the ' shortform can only be used at the beginning of a line.
  4948.  
  4949.  
  4950.